Expand description
VAPP-190: calendar-day maths, the Rust twin of
packages/exponential-ui/src/dates.ts, shared by the records query
(time buckets, host::query) and the bind-time expressions (Q2:
dateAdd, startOf, isoWeek…). Pure and proleptic Gregorian over
YYYY-MM-DD texts, no clock and no locale; fixtures/records-query.json
bucketCases lock it. A date is a calendar day (spec §4.3); a
timestamp’s day is the first ten characters of its ISO text.
Structs§
Enums§
- Date
Bucket - The time buckets a query groups dates by.
Constants§
Functions§
- date_
bucket - A date’s bucket key: day
2026-10-05, week2026-W41(ISO), month2026-10, quarter2026-Q4, year2026;Nonewhen the text holds no date that precise. - day_
from_ number - day_
number - VAPP-191: the days since 1970-01-01 of a calendar day (negative before;
Howard Hinnant’s days_from_civil), and back (
dayNumber/dayFromNumberin dates.ts). - day_
of_ year - 1-based day of the year.
- days_
in_ month - format_
day YYYY-MM-DD.- is_
leap_ year - iso_
week - The ISO week (Monday first, week 1 holds the first Thursday):
(year, week). - iso_
weeks_ in_ year - ISO 8601 weeks in a year: 53 when it starts on a Thursday (or a Wednesday in a leap year).
- parse_
day - The calendar day at the start of
text(YYYY-MM-DD, then the end,Tor a space);Nonewhen it is not a real day. - parse_
month - The year and month at the start of
text(YYYY-MM, then the end or-). - parse_
year - The year at the start of
text(YYYY, then the end or-). - weekday_
of - 0 = Sunday (Sakamoto’s method).