Skip to content

TemporalDataType

TemporalDataType = "instant" | "datetime" | "duration" | "date" | "time"

Names the date and time data types and their canonical JSON forms.

  • 'instant': [epochMilliseconds, nanoseconds], a UTC instant as integer milliseconds since the epoch plus 0 to 999,999 sub-millisecond nanoseconds.
  • 'datetime': [epochMilliseconds, nanoseconds, timeZone], the same instant with an IANA time zone name such as Australia/Sydney.
  • 'duration': an ISO 8601 duration string such as P1DT2H.
  • 'date': a calendar date string yyyy-MM-dd in the proleptic Gregorian calendar.
  • 'time': a time-of-day string HH:mm:ss or HH:mm:ss.SSS.

In memory, 'instant' and 'datetime' values are luxon DateTime objects with millisecond precision, so the nanosecond component does not round-trip through handlers. In JSONB storage the Runtime adds an __instant__<key> sidecar holding nanoseconds since the epoch, which filters and sorts use for both types.