HelixOverviewDocsComponentsSandboxTheme builderCortexDocsEngramBuildingTraceBuildingRecallDeclaredServicesInsightsGet in touchSource on GitHub
Loading the reference
Format DateView SourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA timestamp, written the way the reader's locale writes one.ExperimentalSince 0.1.0TypographyUsageimport'@fusion.dev/helix/format-date'import'@fusion.dev/helix-headless/format-date'Preview
API ReferenceRoothelix-format-dateA timestamp, written the way the reader's locale writes one.
PropTypeDefaultDescriptiondatestring""The timestamp, as anything `Date` parses.day"numeric"|"2-digit"How the day of the month is written, where a date is shown.elapsedbooleanfalseShow how long ago it was, compactly, instead of the date.hour"numeric"|"2-digit"How the hour is written, where a time of day is shown.localestring""Locale for the reading.minute"numeric"|"2-digit"How the minute is written, where a time of day is shown.month"numeric"|"2-digit"|"long"|"short"|"narrow"How the month is written, where a date is shown.second"numeric"|"2-digit"How the second is written, where a time of day is shown.timeZonestringThe time zone to read the timestamp in.timeZoneName"long"|"short"Whether to name the time zone, and how.weekday"long"|"short"|"narrow"How the weekday is written, where one is shown.year"numeric"|"2-digit"How the year is written, where a date is shown.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
PartDescriptiontimeThe `<time>` element carrying the reading.
Roothelix-headless-format-dateA timestamp, written the way the reader's locale writes one.
PropTypeDefaultDescriptiondatestring""The timestamp, as anything `Date` parses.day"numeric"|"2-digit"How the day of the month is written, where a date is shown.elapsedbooleanfalseShow how long ago it was, compactly, instead of the date.hour"numeric"|"2-digit"How the hour is written, where a time of day is shown.localestring""Locale for the reading.minute"numeric"|"2-digit"How the minute is written, where a time of day is shown.month"numeric"|"2-digit"|"long"|"short"|"narrow"How the month is written, where a date is shown.second"numeric"|"2-digit"How the second is written, where a time of day is shown.timeZonestringThe time zone to read the timestamp in.timeZoneName"long"|"short"Whether to name the time zone, and how.weekday"long"|"short"|"narrow"How the weekday is written, where one is shown.year"numeric"|"2-digit"How the year is written, where a date is shown.
ReadTypeDescriptionwhenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
PartDescriptiontimeThe `<time>` element carrying the reading.
ExamplesNameDescriptionPreviewAn elapsed reading, and three arrangements of a fixed date.PreviewAn elapsed reading, and three arrangements of a fixed date.