Liking cljdoc? Tell your friends :D

vaelii.impl.datetime

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.
raw docstring

boundsclj

(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.
sourceraw docstring

calendar-functionsclj

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)`.
sourceraw docstring

calendar-term?clj

(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)`.
sourceraw docstring

datetime-functionclj

The structural ISO constructor this namespace reads.

The structural ISO constructor this namespace reads.
sourceraw docstring

datetime-term?clj

(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.
sourceraw docstring

instant-fieldsclj

(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.
sourceraw docstring

instant-functionclj

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.
sourceraw docstring

instant-termclj

(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.
sourceraw docstring

instant-term?clj

(instant-term? form)

True iff form is a well-formed (InstantFn …) term.

True iff `form` is a well-formed `(InstantFn …)` term.
sourceraw docstring

subinterval?clj

(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.
sourceraw docstring

time-term?clj

(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`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close