Skip to content
Kimenpre-v1documentation home
Color scheme

ki-format-date

Pass YYYY-MM-DD for a calendar day, or use an ISO date-time for a timestamp. The formatter uses the closest lang declaration, including its own. Set time-zone to display a timestamp in an IANA time zone. Calendar dates always keep their source day.

Theme for this example
Color scheme for this example
<ki-format-date date="2026-11-19" date-style="long" lang="es-ES"></ki-format-date>

date-style and time-style accept full, long, medium and short. With both omitted, the formatter shows a medium date. The result is a native time element with its original ISO value in datetime.

API reference

When to use: For raw date and timestamp values in tables, records and prose.

When not to use: For an editable date or an elapsed time that should change as the clock advances.

Properties & attributes

AttributePropertyTypeDefaultDescription
datedatestring | undefined–ISO calendar date (YYYY-MM-DD) or ISO date-time. A timestamp without an offset uses local time.
date-styledateStyle"full" | "long" | "medium" | "short" | undefined–Date detail. Defaults to medium when neither date style nor time style is supplied.
langlocalestring | undefined–Language tag for the formatted date. Inherits the nearest HTML lang declaration when omitted.
time-styletimeStyle"full" | "long" | "medium" | "short" | undefined–Time detail. Omit to show the date alone.
time-zonetimeZonestring | undefined–IANA time zone for a timestamp. A calendar date keeps its day in every zone.

CSS custom properties

The public styling contract of ki-format-date: reassign these tokens at :root or on a subtree — never override internals.

TokenDescription
--ki-format-date-font-familyDefault body font family for ki-format-date on a bare page.

Workshop

Open ki-format-date in Storybook