Skip to content

dateTime
@localizer/format 1.1.3

The dateTime provides a convenient way to format date and time values.

Usage

typescript
import { 
dateTime
} from '@localizer/format';
const
result
=
dateTime
(new
Date
(2025, 2, 23, 12, 59, 0));

Formatter accepts JavaScript Date objects or numbers, which are treated as timestamps (milliseconds since January 1, 1970, 00:00:00 UTC).

Demo

LocaleLocalized value
en-US  American English3/23/2025, 09:59:00 AM
fr-FR  French (France)23/03/2025 09:59:00
de-DE  German (Germany)23.3.2025, 09:59:00
fi-FI  Finnish (Finland)23.3.2025 klo 09.59.00
sv-FI  Swedish (Finland)2025-03-23 09:59:00
ko-KR  Korean (South Korea)2025. 3. 23. 오전 09:59:00
hi-IN  Hindi (India)23/3/2025, 09:59:00 am

See also