Skip to content

Commit

Permalink
fix: update docs
Browse files Browse the repository at this point in the history
frytg committed Dec 22, 2024
1 parent 6d56095 commit 64368fc
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dates/README.md
Original file line number Diff line number Diff line change
@@ -5,12 +5,22 @@

This is a simple opinionated wrapper around the [Luxon](https://github.com/moment/luxon) library to provide pre-configured helpers.

For example, to get the current date in ISO format:

```ts
import { getISO } from '@frytg/dates';

getISO(); // returns string like 2025-01-01T00:00:00.000Z
```

You can also use the full `DateTime` object from Luxon:

```ts
import { DateTime } from '@frytg/dates';

const date = DateTime.fromMillis(1719859200000);
```

## Author

Created by [@frytg](https://github.com/frytg) / [frytg.digital](https://www.frytg.digital)
2 changes: 1 addition & 1 deletion dates/dates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// load package
import { format as stdFormat } from '@std/fmt/duration'
// @deno-types="npm:@types/luxon"
// @deno-types="npm:@types/luxon@^3.4.2"
import { DateTime } from 'luxon'

const LOCAL_TIMEZONE = 'Europe/Amsterdam'

0 comments on commit 64368fc

Please sign in to comment.