Lion Logo Lion Guides Components Docs Blog Toggle darkmode

Localize: Format Dates

Features

  • Small file size
  • Uses Intl.DateFormat but patches browser inconsistencies

Formatting

With the formatDate you can safely display dates for all languages.

The input value is new Date('1987/05/12').

List common locales

The input value is new Date('1987/05/12'). Formatting happens via

formatDate(new Date('1987/05/12'), { locale });

List all locales

The following list shows date formatting for all known locales.

The input value is new Date('1987/05/12'). Formatting happens via

formatDate(new Date('1987/05/12'), { locale });