Skip to content

Commit

Permalink
docs: modify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiboss committed Jun 18, 2024
1 parent c2a37ed commit 29cd645
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/use-date-format/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ export function App() {
const time = useDateFormat(now, 'HH:mm:ss • hh:mm:ss • H:m:s • h:m:s')
const input = useControlledComponent("[Today is] M/D/YYYY, ddd, [now is] A H [o'clock] m [min] s [sec] SSS [ms]")

const playground = useDateFormat(now, input.value, {
locales: 'en-US',
customMeridiem: (hours: number) => (hours < 12 ? 'A.M.' : 'P.M.'),
})
const playground = useDateFormat(now, input.value, { locales: 'en-US' })

return (
<Card>
Expand Down
6 changes: 3 additions & 3 deletions src/use-date-format/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import source from '!!raw-loader!./demo'

<RawCode>{source}</RawCode>

## Formats
## Format Tokens

| Format | Output | Description |
| Token | Output | Description |
| ------ | ------------------------ | --------------------------------------- |
| `Yo` | 2018th | Ordinal formatted year |
| `YY` | 18 | Two-digit year |
Expand Down Expand Up @@ -100,7 +100,7 @@ export type UseDateFormatOptions = FormatDateOptions & {
/**
* fallback string when date is invalid
*/
fallbackStr?: string
fallback?: string
}
```
Expand Down

0 comments on commit 29cd645

Please sign in to comment.