Reads the time terms — a DatetimeFn reduced-precision ISO string, the calendar
constructors YearFn / MonthFn / DayFn, a DatetimeRangeFn range and the
InstantFn moment — to integer field vectors. Field nesting is calendar containment
(subinterval?, docs/context-nat.md); extent is a term's half-open [start end) of
seven-field moments, bounds the one the calendar clock names, and utc-extent reads a
UTC offset or a ZonedDatetimeFn zone (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`, a `DatetimeRangeFn` range and the `InstantFn` moment — to integer field vectors. Field nesting is calendar containment (`subinterval?`, docs/context-nat.md); `extent` is a term's half-open `[start end)` of seven-field moments, `bounds` the one the calendar clock names, and `utc-extent` reads a UTC offset or a `ZonedDatetimeFn` zone (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.
(at-or-inside? t [bs be])True iff the moment t, seven fields, lies in the half-open extent [bs be).
True iff the moment `t`, seven fields, lies in the half-open extent `[bs be)`.
(bounds form)The half-open [start end) a calendar term to the second or coarser lies between, each
a seven-field moment: the end is the first moment of the next term at the same precision.
Nil for a sub-second term, whose bounds no InstantFn term names, and for a term that is
not a calendar one or names no moment.
The half-open `[start end)` a calendar term to the second or coarser lies between, each a seven-field moment: the end is the first moment of the next term at the same precision. Nil for a sub-second term, whose bounds no `InstantFn` term names, and 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-spelling t)t with each time term in no zone inside it, innermost first, in the one spelling read
off its extent: an InstantFn moment, and (StartFn T) / (EndFn T) of a term T with
an extent, as moment-spelling gives the moment; any other term with an extent as
extent-spelling gives it. A time with a UTC offset or a zone, a named time and any
other term keep their spelling (docs/context-nat.md, "Two spellings of one calendar time
name one context").
`t` with each time term in no zone inside it, innermost first, in the one spelling read off its extent: an `InstantFn` moment, and `(StartFn T)` / `(EndFn T)` of a term `T` with an `extent`, as `moment-spelling` gives the moment; any other term with an `extent` as `extent-spelling` gives it. A time with a UTC offset or a zone, a named time and any other term keep their spelling (docs/context-nat.md, "Two spellings of one calendar time name one context").
(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)`.
(containing-terms t)The terms in no zone that subinterval? or instant-within? can answer contain the
time t in no zone, t among them and a DatetimeRangeFn range excepted: for each
prefix of a calendar term's own fields, of an InstantFn moment's moment-fields, or of
a range's start's to the range's precision (range-precision), the DatetimeFn term in
every spelling (spellings, and the one iso gives past the sixth field) and the
calendar term of as many fields. Nil for any other term.
The terms in no zone that `subinterval?` or `instant-within?` can answer contain the time `t` in no zone, `t` among them and a `DatetimeRangeFn` range excepted: for each prefix of a calendar term's own fields, of an `InstantFn` moment's `moment-fields`, or of a range's start's to the range's precision (`range-precision`), the `DatetimeFn` term in every spelling (`spellings`, and the one `iso` gives past the sixth field) and the calendar term of as many fields. Nil for any other term.
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.
(disjoint? a b)True iff the calendar shows the time terms a and b share no time: two moments with
different fields, a moment outside an interval term's extent, or two extents in one
frame (paired-extents) that do not overlap. false for anything else, a named time
included.
True iff the calendar shows the time terms `a` and `b` share no time: two moments with different fields, a moment outside an interval term's extent, or two extents in one frame (`paired-extents`) that do not overlap. `false` for anything else, a named time included.
(epoch-second fields)The seconds from 1970-01-01T00:00:00 to the moment seven fields name, both read on one clock, exact: a long on a whole second and a ratio between two. Nil when the calendar has no such moment.
The seconds from 1970-01-01T00:00:00 to the moment seven fields name, both read on one clock, exact: a long on a whole second and a ratio between two. Nil when the calendar has no such moment.
(extent form)The half-open wall-clock [start end) a time interval term in no zone lies between: a
calendar term's bounds at any precision, or a DatetimeRangeFn range's. Nil for any
other term.
The half-open wall-clock `[start end)` a time interval term in no zone lies between: a calendar term's bounds at any precision, or a `DatetimeRangeFn` range's. Nil for any other term.
(instant-fields form)The moment of an (InstantFn Y M D h m s) term, its six fields and a nanosecond field
of 0, 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 moment of an `(InstantFn Y M D h m s)` term, its six fields and a nanosecond field of 0, 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 on a whole second, six integer fields always:
(InstantFn 2000 1 1 0 0 0) is midnight at the start of 2000.
The structural constructor for a moment on a whole second, six integer fields always: `(InstantFn 2000 1 1 0 0 0)` is midnight at the start of 2000.
(instant-term m)The (InstantFn …) term of the moment m, six fields or seven, a PersistentList as
sentex/canon normalizes a typed one to; nil when the nanosecond field is not 0.
The `(InstantFn …)` term of the moment `m`, six fields or seven, a `PersistentList` as `sentex/canon` normalizes a typed one to; nil when the nanosecond field is not 0.
(instant-term? form)True iff form is a well-formed (InstantFn …) term.
True iff `form` is a well-formed `(InstantFn …)` term.
(instant-within? a b)True iff a is an InstantFn moment at or inside the interval term b's extent, or
the same moment as the InstantFn term b. false otherwise, two intervals
included: those are subinterval?'s.
True iff `a` is an `InstantFn` moment at or inside the interval term `b`'s extent, or the same moment as the `InstantFn` term `b`. `false` otherwise, two intervals included: those are `subinterval?`'s.
(moments t)The [frame fields] of each point the calendar places of the time term t, in
timepoint/moment's frames: an InstantFn moment's own, else the start and end of the
term's extent, :local in no zone and :utc with an offset or a zone. Empty for any
other term.
The `[frame fields]` of each point the calendar places of the time term `t`, in `timepoint/moment`'s frames: an `InstantFn` moment's own, else the start and end of the term's extent, `:local` in no zone and `:utc` with an offset or a zone. Empty for any other term.
(month-buckets form)The [frame year month] of each point (moments) of each time term in form, as a
set: the months of the calendar index's nodes (kv/index-families' :calendar) a stored
fact enters under its functor.
The `[frame year month]` of each point (`moments`) of each time term in `form`, as a set: the months of the calendar index's nodes (`kv/index-families`' `:calendar`) a stored fact enters under its functor.
The registered pure comparators of an order, {relation → (fn [a b] a-below-b?)}.
Each reads two terms' shape with no store read and no proof, and is total, returning
false for terms it does not apply to. subtimeOf's answers the pairs whose lower
term is a moment and leaves two intervals to subintervalOf's. context-nat reads one
to order two context NATs, and the canonicalizer reads one to absorb a meet's argument
(res/meet-order).
The registered pure comparators of an order, `{relation → (fn [a b] a-below-b?)}`.
Each reads two terms' shape with no store read and no proof, and is total, returning
`false` for terms it does not apply to. `subtimeOf`'s answers the pairs whose lower
term is a moment and leaves two intervals to `subintervalOf`'s. `context-nat` reads one
to order two context NATs, and the canonicalizer reads one to absorb a meet's argument
(`res/meet-order`).(paired-extents a b)[extent-a extent-b] read in one frame, both in no zone or both absolute, or nil: a
wall-clock time in no zone and an absolute one have no order.
`[extent-a extent-b]` read in one frame, both in no zone or both absolute, or nil: a wall-clock time in no zone and an absolute one have no order.
The structural constructor of a range, two ISO strings: (DatetimeRangeFn "2000-01" "2000-06") begins when its first string's interval begins and ends when its second's
ends.
The structural constructor of a range, two ISO strings: `(DatetimeRangeFn "2000-01" "2000-06")` begins when its first string's interval begins and ends when its second's ends.
(subinterval? a b)True iff time term a denotes an interval contained in b's (reflexive): for two
calendar or ISO terms in no zone, b's fields are a prefix of a's; else a's extent
lies inside b's in one frame (paired-extents). false for anything else.
True iff time term `a` denotes an interval contained in `b`'s (reflexive): for two calendar or ISO terms in no zone, `b`'s fields are a prefix of `a`'s; else `a`'s extent lies inside `b`'s in one frame (`paired-extents`). `false` for anything else.
(time-term? form)True iff form is any term this namespace reads — a calendar constructor, a
DatetimeFn string, a DatetimeRangeFn range, 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, a `DatetimeRangeFn` range, or an `InstantFn` moment. The test behind `provers/shadowing-channels`' `:calendar`.
(utc-extent form)The half-open UTC [start end) of a term with a UTC offset or a named zone, a range of
two such strings included; nil for a term in no zone.
The half-open UTC `[start end)` of a term with a UTC offset or a named zone, a range of two such strings included; nil for a term in no zone.
(within? [as ae] [bs be])True iff the half-open extent [as ae) lies inside [bs be), each bound a seven-field
moment.
True iff the half-open extent `[as ae)` lies inside `[bs be)`, each bound a seven-field moment.
The structural constructor of a wall-clock time in a named zone: (ZonedDatetimeFn "2000-03-26T00:30" "Europe/London").
The structural constructor of a wall-clock time in a named zone: `(ZonedDatetimeFn "2000-03-26T00:30" "Europe/London")`.
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 |