ddn.columnar.temporal_access

The temporal component accessors of ddn.df (ADR-2026-10-23-12): year/month/dayOfMonth on DATETIME (the UTC civil date of the instant - days-from-epoch by floor division, then the civil-from-days algorithm, Howard Hinnant's, so pre-epoch instants are correct and nothing depends on the host's timezone), and hour on DATETIME (the UTC hour of day) and TIME (TimeOfDay's hour). Meaningless components throw: calendar parts of TIME, everything on non-temporal kinds. Nulls propagate.

Types 1

private structFormatToken
Fields
bool isDirective
dchar directive
string literal

Functions 22

private fnvoid civilOfDays(long days, out long year, out uint month, out uint day) @safe pure nothrow
private fnSeries temporalComponent(Series s, string part)
fnSeries yearOf(Series s)The UTC calendar year of each instant (ADR-2026-10-23-12).
fnSeries monthOf(Series s)The UTC month of each instant (1..12).
fnSeries dayOfMonthOf(Series s)The UTC day of month of each instant (1..31).
fnSeries hourOf(Series s)The UTC hour of day (0..23) - DATETIME and TIME both.
fnSeries addMonths(Series s, long months)Adds calendar months to a DATETIME or DATE column (ADR-2026-10-30-02): UTC civil arithmetic; the day clamps to the target month's end (Jan 31 + 1mo -> Feb 28/29); DATETIME keeps its time of day; ne...
fnSeries addYears(Series s, long years)Ditto, calendar years.
private fnSeries addCalendar(Series s, long months, long years)
fnSeries truncate(Series s, long every)Truncates each instant to a fixed multiple of `every` (ADR-2026-10-30-02): floored toward negative infinity (pre-epoch instants stay on their boundary), anchored at epoch zero; the duration must be...
fnSeries truncateCalendar(Series s, CalendarUnit unit)Truncates each value to a calendar boundary (ADR-2026-10-30-02): YEAR, QUARTER, MONTH, WEEK (Monday-anchored, the ISO convention) or DAY, in UTC. On DATETIME the time of day clears to midnight (DAY...
fnSeries roundTemporal(Series s, long every)Rounds each instant to the nearest multiple of `every` (ADR-2026-10-30-02): fixed durations only, ties half away from zero (the house `round()` policy, ADR-2026-10-23-08). Nulls propagate.
fnSeries between(Series s, Timestamp left, Timestamp right, Closed closed = Closed.BOTH)The between range predicate (ADR-2026-10-30-02): Kleene BOOLEAN `left (closed?) value (closed?) right` over the temporal kinds; null operands yield null (a filter drops the row, as always).
fnSeries between(Series s, Date left, Date right, Closed closed = Closed.BOTH)Ditto, DATE endpoints (DATE columns compare with `Date`).
fnSeries between(Series s, TimeOfDay left, TimeOfDay right, Closed closed = Closed.BOTH)Ditto, TIME endpoints (TIME columns compare with `TimeOfDay`).
private fnFormatToken[] compileFormat(scope const(char)[] fmt)
private fnchar[] renderTimestampInto(FormatToken[] tokens, long days, long ofDay, return char[] buf) @safe pure nothrow
private fnsize_t put2(return scope char[] buf, size_t at, long v) @safe pure nothrow
private fnsize_t put4(return scope char[] buf, size_t at, long v) @safe pure nothrow
fnSeries formatTimestampWith(Series s, string fmt)Formats each DATETIME instant through a strftime-style pattern (ADR-2026-10-30-02 D8): the locale-free subset `%Y %m %d %H %M %S %f %z %F %T %%`; `%f` renders up to nine fractional digits with trai...
private fnlong digitsAt(scope const(char)[] text, ref size_t at, uint n) @safe pure nothrow
fnSeries parseTimestampWith(Series s, string fmt, bool strict = true)Parses STRING cells through a strptime-style pattern into DATETIME instants (ADR-2026-10-30-02 D8): the locale-free subset `%Y %m %d %H %M %S %f %z %F %T %%` (four-digit `%Y`, two-digit pairs, `%f`...