Date & Time Formatting

Formatting options mirror the Intl.DateTimeFormat API. Mix and match month, day, year, weekday, hour, minute, and second attributes.

Full date:
Time:
Weekday:
Month:
Year:
No options (default):

Specific Date

Use the date attribute with an ISO 8601 string to format a specific date.

ISO string:
With time:

Hour Formatting

Use hour-format="12" or hour-format="24" to force 12- or 24-hour time. Default is auto (browser locale).

12-hour:
24-hour:
Auto (browser):

Weekday Formats

The weekday attribute accepts long, short, or narrow.

long:
short:
narrow:

Time Zone

Use the time-zone attribute to display the time in a specific zone.

New York:
London:
Tokyo: