Reads the time terms — a DatetimeFn reduced-precision ISO string, the calendar
constructors YearFn / MonthFn / DayFn, and the InstantFn moment — to integer
field vectors. Field nesting is calendar containment (subinterval?,
docs/context-nat.md); bounds is the half-open [start end) the calendar clock reads
(docs/time.md). Every reader is pure and total, returning nil rather than throwing,
because the structural genlCx producer calls it inside the settle/relabel loop.
Reads the time terms — a `DatetimeFn` reduced-precision ISO string, the calendar constructors `YearFn` / `MonthFn` / `DayFn`, and the `InstantFn` moment — to integer field vectors. Field nesting is calendar containment (`subinterval?`, docs/context-nat.md); `bounds` is the half-open `[start end)` the calendar clock reads (docs/time.md). Every reader is pure and total, returning nil rather than throwing, because the structural genlCx producer calls it inside the settle/relabel loop.
(bounds form)The half-open [start end) a calendar term lies between, each a six-field vector: the
end is the first moment of the next term at the same precision. Nil for a term that is
not a calendar one or names no moment.
The half-open `[start end)` a calendar term lies between, each a six-field vector: the end is the first moment of the next term at the same precision. Nil for a term that is not a calendar one or names no moment.
The structural calendar constructors, functor → field count, one integer per field,
coarsest first: (YearFn 2000), (MonthFn 2000 1), (DayFn 2000 1 15).
The structural calendar constructors, `functor → field count`, one integer per field, coarsest first: `(YearFn 2000)`, `(MonthFn 2000 1)`, `(DayFn 2000 1 15)`.
(calendar-term? form)True iff form is a well-formed calendar term — (YearFn 2000), (MonthFn 2000 1) or
(DayFn 2000 1 15).
True iff `form` is a well-formed calendar term — `(YearFn 2000)`, `(MonthFn 2000 1)` or `(DayFn 2000 1 15)`.
The structural ISO constructor this namespace reads.
The structural ISO constructor this namespace reads.
(datetime-term? form)True iff form is a (DatetimeFn "<iso>") term with a parseable ISO string.
True iff `form` is a `(DatetimeFn "<iso>")` term with a parseable ISO string.
(instant-fields form)The six fields of an (InstantFn Y M D h m s) term, or nil for anything that is not
one — a term of the wrong arity, a field out of range, or a date the calendar does not
have.
The six fields of an `(InstantFn Y M D h m s)` term, or nil for anything that is not one — a term of the wrong arity, a field out of range, or a date the calendar does not have.
The structural constructor for a moment, six integer fields always:
(InstantFn 2000 1 1 0 0 0) is midnight at the start of 2000.
The structural constructor for a moment, six integer fields always: `(InstantFn 2000 1 1 0 0 0)` is midnight at the start of 2000.
(instant-term fields)The (InstantFn …) term six fields name, a PersistentList as sentex/canon
normalizes a typed one to.
The `(InstantFn …)` term six fields name, a `PersistentList` as `sentex/canon` normalizes a typed one to.
(instant-term? form)True iff form is a well-formed (InstantFn …) term.
True iff `form` is a well-formed `(InstantFn …)` term.
(subinterval? a b)True iff time term a denotes an interval contained in b's: b's fields are a
prefix of a's (reflexive). false for anything that is not a pair of time terms.
True iff time term `a` denotes an interval contained in `b`'s: `b`'s fields are a prefix of `a`'s (reflexive). `false` for anything that is not a pair of time terms.
(time-term? form)True iff form is any term this namespace reads — a calendar constructor, a
DatetimeFn string, or an InstantFn moment. The test behind
provers/shadowing-channels' :calendar.
True iff `form` is any term this namespace reads — a calendar constructor, a `DatetimeFn` string, or an `InstantFn` moment. The test behind `provers/shadowing-channels`' `:calendar`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |