Timestamp Object

Timestamp objects are immutable plain objects with Gregorian calendar fields and optional time fields.

export interface Timestamp {
  readonly date: string
  readonly hasDay: boolean
  readonly year: number
  readonly month: number
  readonly day: number
  readonly time?: string
  readonly hasTime: boolean
  readonly hour: number
  readonly minute: number
  readonly second?: number
  readonly millisecond?: number
  readonly timezone?: string
  readonly weekday?: number
  readonly doy?: number
  readonly workweek?: number
  readonly past?: boolean
  readonly current?: boolean
  readonly future?: boolean
  readonly disabled?: boolean
}

Important fields

FieldMeaning
dateDate string in YYYY-MM-DD form when the timestamp has a day.
timeTime string formatted as HH:mm, HH:mm:ss, or HH:mm:ss.SSS.
hasDayTrue when the timestamp includes a meaningful date/day value.
hasTimeTrue when the timestamp includes time fields.
weekdayWeekday number where Sunday is 0 and Saturday is 6.
doyDay of the year.
workweekISO-style workweek number.
timezonePreserved timezone suffix such as Z, +06:00, or -0700.
pastTrue when the timestamp is before a comparison timestamp.
currentTrue when the timestamp matches a comparison timestamp.
futureTrue when the timestamp is after a comparison timestamp.
disabledTrue when this timestamp represents a disabled date.

Hover documentation

The source is documented with TypeScript/JSDoc comments so editors can show field and helper details on hover.