The Period: a CLOSED interval of days, "from 01/11 to 25/11", both ends included. Half-open is a property of the interval of INSTANTS a Period becomes under a zone, never of the Period.
Both ends are required: a missing end is a REFUSAL, never an open interval -- it is not "up to today".
Map keys are the generic English names (:start :end).
The Period: a CLOSED interval of days, "from 01/11 to 25/11", both ends included. Half-open is a property of the interval of INSTANTS a Period becomes under a zone, never of the Period. Both ends are required: a missing end is a REFUSAL, never an open interval -- it is not "up to today". Map keys are the generic English names (:start :end).
(->period start end)Validating constructor: a nil end -> :time/period-missing-bound; start > end -> :time/period-inverted.
Validating constructor: a nil end -> :time/period-missing-bound; start > end -> :time/period-inverted.
(current-month today)The period from the first day of today's month up to today.
The period from the first day of `today`'s month up to `today`.
(days p)How many days the period covers, ends included.
How many days the period covers, ends included.
(period? x)True when x is a valid Period. Never throws.
True when `x` is a valid Period. Never throws.
(previous-month today)The previous full month, from its first to its last day.
The previous full month, from its first to its last day.
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 |