Spaces:
Running
Running
Download src/utils/date.js from brestok/eu-scrapper-ui: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/spaces/brestok/eu-scrapper-ui/resolve/main/src/utils/date.js
- Command line
-
hf download hf://spaces/brestok/eu-scrapper-ui/src/utils/date.js
-
curl -L -o date.js https://huggingface.co/spaces/brestok/eu-scrapper-ui/resolve/main/src/utils/date.js
593 Bytes
| export function formatDateTime(input) { | |
| if (!input) return '' | |
| const date = input instanceof Date ? input : new Date(input) | |
| const tz = Intl.DateTimeFormat().resolvedOptions().timeZone | |
| return new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short', timeZone: tz }).format(date) | |
| } | |
| export function formatDate(input) { | |
| if (!input) return '' | |
| const date = input instanceof Date ? input : new Date(input) | |
| const tz = Intl.DateTimeFormat().resolvedOptions().timeZone | |
| return new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeZone: tz }).format(date) | |
| } | |