namespace
DateTime
Instants on the wall-clock timeline (UTC), stored as a plain int: the count of seconds since 1970-01-01, matching Time.now. Build one with DateTime.from, shift it by a Duration with DateTime.add, and pull it apart with the year/month/day/hour/minute/second readers. Deterministic integer math throughout; v1 is UTC-only with no leap seconds, and assumes instants at or after 1970.
DateTime.from(year, month, day, hour, minute, second) -> intBuild an instant from its calendar parts.DateTime.date(dt) -> intThe calendar day the instant falls on.DateTime.add(dt, span) -> intThe instant `span` seconds later.DateTime.year(dt) -> intThe calendar year of an instant.DateTime.month(dt) -> intThe month (1-12) of an instant.DateTime.day(dt) -> intThe day of the month (1-31) of an instant.DateTime.weekday(dt) -> intDay of the week, 0=Sunday..6=Saturday.DateTime.hour(dt) -> intThe hour of day (0-23) of an instant.DateTime.minute(dt) -> intThe minute of the hour (0-59) of an instant.DateTime.second(dt) -> intThe second of the minute (0-59) of an instant.DateTime.format(dt, pattern) -> stringRender an instant as text using a token pattern.DateTime.parse(text, pattern) -> intParse text into an instant; -1 on failure.