Module /chrono #
High-precision monotonic timers (Steady-Clock), civil dates (Date, Time, Date-Time), IANA time zones (Zoned-Date-Time), and durations.
(use /chrono)
!= #
(!= ...)
Exported function in /chrono.
+ #
(+ ...)
Exported function in /chrono.
- #
(- ...)
Exported function in /chrono.
< #
(< ...)
Exported function in /chrono.
<= #
(<= ...)
Exported function in /chrono.
== #
(== ...)
Exported function in /chrono.
> #
(> ...)
Exported function in /chrono.
>= #
(>= ...)
Exported function in /chrono.
Date #
(Date ...)
Exported function in /chrono.
Date-Time #
(Date-Time ...)
Exported function in /chrono.
Date-Time/local #
(Date-Time/local ...)
Exported function in /chrono.
Date-Time/utc #
(Date-Time/utc ...)
Exported function in /chrono.
Date/local #
(Date/local ...)
Exported function in /chrono.
Date/utc #
(Date/utc ...)
Exported function in /chrono.
Duration #
(Duration ...)
Exported function in /chrono.
Duration-from #
(Duration-from start-instant) -> Duration
Calculates the elapsed duration since start-instant as [secs nanos].
Instant #
(Instant) -> Instant
Captures the current high-resolution monotonic timer instant.
(let t0 (Instant))
; work...
(let elapsed (Duration-from t0))
Local-Time #
(Local-Time ...)
Exported function in /chrono.
Span #
(Span ...)
Exported function in /chrono.
Steady-Clock/elapsed #
(Steady-Clock/elapsed ...)
Exported function in /chrono.
Steady-Clock/measure #
(Steady-Clock/measure ...)
Exported function in /chrono.
Steady-Clock/now #
(Steady-Clock/now ...)
Exported function in /chrono.
Steady-Instant #
(Steady-Instant ...)
Exported function in /chrono.
Time #
(Time ...)
Exported function in /chrono.
Time/local #
(Time/local ...)
Exported function in /chrono.
Time/utc #
(Time/utc ...)
Exported function in /chrono.
Zoned-Date-Time #
(Zoned-Date-Time ...)
Exported function in /chrono.
Zoned-Date-Time/in #
(Zoned-Date-Time/in ...)
Exported function in /chrono.
Zoned-Date-Time/local #
(Zoned-Date-Time/local ...)
Exported function in /chrono.
Zoned-Date-Time/utc #
(Zoned-Date-Time/utc ...)
Exported function in /chrono.
Zoned-Time #
(Zoned-Time ...)
Exported function in /chrono.
add-days #
(add-days ...)
Exported function in /chrono.
add-secs #
(add-secs ...)
Exported function in /chrono.
add-weeks #
(add-weeks ...)
Exported function in /chrono.
age #
(age ...)
Exported function in /chrono.
date-diff #
(date-diff ...)
Exported function in /chrono.
date-trunc #
(date-trunc ...)
Exported function in /chrono.
day-of-week #
(day-of-week ...)
Exported function in /chrono.
day-of-week-iso #
(day-of-week-iso ...)
Exported function in /chrono.
day-of-week-symbol #
(day-of-week-symbol ...)
Exported function in /chrono.
day-of-year #
(day-of-year ...)
Exported function in /chrono.
days #
(days ...)
Exported function in /chrono.
epoch-millis #
(epoch-millis ...)
Exported function in /chrono.
epoch-nanos #
(epoch-nanos ...)
Exported function in /chrono.
epoch-seconds #
(epoch-seconds ...)
Exported function in /chrono.
format-date #
(format-date ...)
Exported function in /chrono.
format-string #
(format-string ...)
Exported function in /chrono.
hours #
(hours ...)
Exported function in /chrono.
is-leap-year? #
(is-leap-year? ...)
Exported function in /chrono.
is-weekday? #
(is-weekday? ...)
Exported function in /chrono.
is-weekend? #
(is-weekend? ...)
Exported function in /chrono.
micros #
(micros ...)
Exported function in /chrono.
millis #
(millis ...)
Exported function in /chrono.
minutes #
(minutes ...)
Exported function in /chrono.
months #
(months ...)
Exported function in /chrono.
nanos #
(nanos ...)
Exported function in /chrono.
nanos-of #
(nanos-of ...)
Exported function in /chrono.
now #
(chrono/now) -> String
Returns the current UTC time as an ISO-8601 formatted string.
offset-of #
(offset-of ...)
Exported function in /chrono.
seconds #
(seconds ...)
Exported function in /chrono.
seconds-of #
(seconds-of ...)
Exported function in /chrono.
timestamp #
(timestamp ...)
Exported function in /chrono.
timestamp-of #
(timestamp-of ...)
Exported function in /chrono.
timezone-of #
(timezone-of ...)
Exported function in /chrono.
to-date #
(to-date ...)
Exported function in /chrono.
to-date-time #
(to-date-time ...)
Exported function in /chrono.
to-duration #
(to-duration ...)
Exported function in /chrono.
to-instant #
(to-instant ...)
Exported function in /chrono.
to-iso-string #
(to-iso-string ...)
Exported function in /chrono.
to-rfc-3339 #
(to-rfc-3339 ...)
Exported function in /chrono.
to-span #
(to-span ...)
Exported function in /chrono.
to-string #
(to-string ...)
Exported function in /chrono.
to-time #
(to-time ...)
Exported function in /chrono.
to-zoned #
(to-zoned ...)
Exported function in /chrono.
weekday-of #
(weekday-of ...)
Exported function in /chrono.
weeks #
(weeks ...)
Exported function in /chrono.
with-timezone #
(with-timezone ...)
Exported function in /chrono.
years #
(years ...)
Exported function in /chrono.
Module /calendar/gregorian #
Pure Gregorian calendar arithmetic: leap years, days in month, weekday indices, and date addition/comparison.
(use /calendar/gregorian)
add-days #
(date day-offset)
Shifts a Gregorian date by whole days.
add-months #
(date month-offset)
Shifts a Gregorian date map by a whole number of months.
add-months-to-year-month #
(year month month-offset)
Shifts a year-month pair by whole months.
compare-dates #
(left right)
Compares two Gregorian dates.
compute-weekday-index #
(date)
Returns the weekday index for a Gregorian date using Sunday as zero.
construct-date #
(year month day)
Constructs a valid Gregorian date map.
construct-today-date #
(...)
Returns the current local Gregorian date.
date-from-epoch-days #
(epoch-days)
Converts an epoch day count into a Gregorian date.
date-from-iso-text #
(text)
Parses an ISO date string into a Gregorian date map.
days-in-month #
(year month)
Returns the number of days in a Gregorian month.
epoch-days-from-date #
(date)
Converts a Gregorian date into an epoch day count.
is-leap-year? #
(year)
Returns true when the year uses the Gregorian leap-year rules.
is-same-date? #
(left right)
Returns true when two Gregorian dates match exactly.
iso-text-from-date #
(date)
Formats a Gregorian date as YYYY-MM-DD.
Module /cron #
Standard 5-field cron expression parsing and schedule matching (Cron, is-matching?, is-matching-now?).
(use /cron)
Cron #
(Cron ...)
Exported function in /cron.
is-matching-now? #
(is-matching-now? ...)
Exported function in /cron.
is-matching? #
(is-matching? ...)
Exported function in /cron.
is-valid? #
(is-valid? value) -> Bool
Returns true if the value conforms to the expected format or schema.