Expand description
Canonical date/datetime parsing and formatting helpers.
Canonical Date/Datetime handling backed by Chrono’s ISO-8601 calendar
implementation. RushDB stores instants as UTC epoch milliseconds.
Functions§
- component_
of - Extract one calendar component from epoch milliseconds, using Chrono’s
field order:
0year,1month,2day,3hour,4minute,5second,6millisecond,7microsecond,8nanosecond. - components_
to_ epoch_ ms - Build epoch milliseconds from validated calendar components.
- components_
to_ epoch_ ms_ checked - Convert calendar components to epoch milliseconds, rejecting values that fall outside the representable range.
- is_
datetime_ string - Report whether a string parses as any supported datetime form.
- json_
datetime_ ms - Extract epoch milliseconds from a JSON number or datetime string.
- ms_
to_ datetime_ string - Serialize epoch milliseconds as a date at midnight UTC, otherwise as an RFC-3339 UTC timestamp with millisecond precision.
- parse_
datetime - Parse a date-only value, RFC 3339 timestamp, or timezone-less ISO local
datetime (defined by
RushDBas UTC) into epoch milliseconds. - start_
of_ month - Epoch milliseconds for the first instant of the calendar month containing
ms. - start_
of_ quarter - Start of the 3-month calendar quarter containing
ms(quarters start at months 1, 4, 7, 10). - start_
of_ year - Epoch milliseconds for the first instant of the calendar year containing
ms.