Timestamp
Absolute timestamp cell and fixed counterpart to RelativeTime, with optional seconds, year, and monospace formatting.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
date | Date | — | The instant to display. |
seconds | boolean | true | Show seconds in the time portion. |
year | boolean | — | Show year. Defaults to true (current year is shown). |
mono | boolean | true | Monospace + tabular figures so stacked rows align. |
relativeTitle | boolean | true | Show relative time on hover via the title attribute. |
Examples
With seconds
Without seconds
Proportional (no mono)
import { Timestamp } from "@solarius/onset";
import type { TimestampProps } from "@solarius/onset";