If true, include the time-literals printer, which will affect the way java.time and js-joda objects are printed
If true, include the time-literals printer, which will affect the way java.time and js-joda objects are printed
(-)
(- arg)
(- arg & args)
Subtract amounts of time.
Subtract amounts of time.
(< _x)
(< x y)
(< x y & more)
Same as clojure.core/<, but works on dates, rather than numbers
Same as clojure.core/<, but works on dates, rather than numbers
(<= _x)
(<= x y)
(<= x y & more)
Same as clojure.core/<=, but works on dates, rather than numbers
Same as clojure.core/<=, but works on dates, rather than numbers
(= _x)
(= x y)
(= x y & more)
Same as clojure.core/=, but works on dates, rather than numbers. can compare different types, e.g. Instant vs ZonedDateTime
Same as clojure.core/=, but works on dates, rather than numbers. can compare different types, e.g. Instant vs ZonedDateTime
(> _x)
(> x y)
(> x y & more)
Same as clojure.core/>, but works on dates, rather than numbers
Same as clojure.core/>, but works on dates, rather than numbers
(>= _x)
(>= x y)
(>= x y & more)
Same as clojure.core/>=, but works on dates, rather than numbers
Same as clojure.core/>=, but works on dates, rather than numbers
(ago dur)
current instant shifted back by duration 'dur'
current instant shifted back by duration 'dur'
(backward-compatible-time-span-extensions)
pre v0.7, ITimeSpan was extended as per this body. run this function to create those extensions.
ITimeSpan is implemented by default on types with a natural beginning and end
pre v0.7, ITimeSpan was extended as per this body. run this function to create those extensions. ITimeSpan is implemented by default on types with a natural beginning and end
(beginning v)
the beginning of the range of ITimeSpan v or v
the beginning of the range of ITimeSpan v or v
(between v1 v2)
(between v1 v2 unit)
for the 2-arity version, find the temporal-amount between v1 and v2, or for the 3-arity version the amount of 'unit' between v1 and v2
for the 2-arity version, find the temporal-amount between v1 and v2, or for the 3-arity version the amount of 'unit' between v1 and v2
(coincident? containing-interval contained-interval)
(coincident? start end event)
for the 2-arity ver, Does containing-interval wholly contain the given contained-interval?
for the 3-arity, does the event lie within the span of time described by start and end
for the 2-arity ver, Does containing-interval wholly contain the given contained-interval? for the 3-arity, does the event lie within the span of time described by start and end
(compare-and-set! at oldval newval)
cas on atomic clock 'at'
cas on atomic clock 'at'
(current-zone)
Return the current zone, which can be overridden by the clock dynamic var
Return the current zone, which can be overridden by the *clock* dynamic var
(date-time? v)
true if v is a date-time?
true if v is a date-time?
(day-of-month)
(day-of-month v)
extract day-of-month from v
extract day-of-month from v
(day-of-week)
(day-of-week v)
extract day-of-week from v
extract day-of-week from v
(day-of-week-in-month ordinal day-of-week)
(day-of-week-in-month t ordinal day-of-week)
(day-of-week? v)
true if v is a day-of-week?
true if v is a day-of-week?
(divide t divisor)
divide TemporalAmount t by divisor, which is a unit e.g. :hours or a TemporalAmount
divide TemporalAmount t by divisor, which is a unit e.g. :hours or a TemporalAmount
(duration x)
return Duration or Period (whichever appropriate based on type) contained within the range of ITimeSpan x
return Duration or Period (whichever appropriate based on type) contained within the range of ITimeSpan x
(end v)
the end of the range of ITimeSpan v or v
the end of the range of ITimeSpan v or v
(epoch)
Constant for the 1970-01-01T00:00:00Z epoch instant
Constant for the 1970-01-01T00:00:00Z epoch instant
(format o)
(format fmt o)
Formats the given time entity as a string.
Accepts something that can be converted to a DateTimeFormatter
as a first
argument. Given one argument uses the default format.
Formats the given time entity as a string. Accepts something that can be converted to a `DateTimeFormatter` as a first argument. Given one argument uses the default format.
(formatter fmt)
(formatter fmt locale)
Constructs a DateTimeFormatter out of either a
and a Locale, which is optional.
Constructs a DateTimeFormatter out of either a * format string - "YYYY/mm/DD" "YYY HH:MM" etc. or * formatter name - :iso-instant :iso-local-date etc and a Locale, which is optional.
(hence dur)
current instant shifted forward by duration 'dur'
current instant shifted forward by duration 'dur'
(in ldt z)
Set a date-time to be in a time-zone
Set a date-time to be in a time-zone
(max arg & args)
Find the latest of the given arguments. Callers should ensure that no argument is nil.
Find the latest of the given arguments. Callers should ensure that no argument is nil.
(max-key _k x)
(max-key k x y)
(max-key k x y & more)
Same as clojure.core/max-key, but works on dates, rather than numbers
Same as clojure.core/max-key, but works on dates, rather than numbers
return e.g Instant/MAX given and Instant
return e.g Instant/MAX given and Instant
(microsecond t)
extract microsecond from t
extract microsecond from t
(millisecond t)
extract millisecond from t
extract millisecond from t
(min arg & args)
Find the earliest of the given arguments. Callers should ensure that no argument is nil.
Find the earliest of the given arguments. Callers should ensure that no argument is nil.
(min-key _k x)
(min-key k x y)
(min-key k x y & more)
Same as clojure.core/min-key, but works on dates, rather than numbers
Same as clojure.core/min-key, but works on dates, rather than numbers
return e.g Instant/MIN given and Instant
return e.g Instant/MIN given and Instant
(modify-printing-of-time-literals-if-enabled!)
(nanosecond t)
extract nanosecond from t
extract nanosecond from t
(negated d)
Return the duration as a negative duration
Return the duration as a negative duration
(new-date)
(new-date epoch-day)
(new-date year day-of-year)
(new-date year month day-of-month)
(new-time)
(new-time hour minute)
(new-time hour minute second)
(new-time hour minute second nano)
(of-days n)
Takes a java.lang.Long n and returns a period of n days.
Takes a java.lang.Long n and returns a period of n days.
(of-hours n)
Takes a java.lang.Long n and returns a duration of n hours.
Takes a java.lang.Long n and returns a duration of n hours.
(of-micros n)
Takes a java.lang.Long n and returns a duration of n micros.
Takes a java.lang.Long n and returns a duration of n micros.
(of-millis n)
Takes a java.lang.Long n and returns a duration of n micros.
Takes a java.lang.Long n and returns a duration of n micros.
(of-minutes n)
Takes a java.lang.Long n and returns a duration of n minutes.
Takes a java.lang.Long n and returns a duration of n minutes.
(of-months n)
Takes a java.lang.Long n and returns a period of n months.
Takes a java.lang.Long n and returns a period of n months.
(of-nanos n)
Takes a java.lang.Long n and returns a duration of n nanoseconds.
Takes a java.lang.Long n and returns a duration of n nanoseconds.
(of-seconds n)
Takes a java.lang.Long n and returns a duration of n seconds.
Takes a java.lang.Long n and returns a duration of n seconds.
(of-years n)
Takes a java.lang.Long n and returns a period of n years.
Takes a java.lang.Long n and returns a period of n years.
(offset-by ldt offset)
Set a date-time to be offset by an amount
Set a date-time to be offset by an amount
(offset-date-time? v)
true if v is a offset-date-time?
true if v is a offset-date-time?
(parse-date date-str formatter)
to parse an iso-formatted date, use (t/date "2020..") instead
to parse an iso-formatted date, use (t/date "2020..") instead
(parse-date-time date-str formatter)
to parse an iso-formatted date-time, use (t/date-time "2020..") instead
to parse an iso-formatted date-time, use (t/date-time "2020..") instead
(parse-day input)
en locale specific and borderline deprecated. consider writing your own regex or use a formatter. For example:
(-> (t/formatter "EEE") (cljc.java-time.format.date-time-formatter/parse "Tue") (cljc.java-time.day-of-week/from))
en locale specific and borderline deprecated. consider writing your own regex or use a formatter. For example: (-> (t/formatter "EEE") (cljc.java-time.format.date-time-formatter/parse "Tue") (cljc.java-time.day-of-week/from))
(parse-month input)
en locale specific and borderline deprecated. Consider writing your own regex or use a formatter. For example:
(-> (t/formatter "MMM") (cljc.java-time.format.date-time-formatter/parse "Jan") (cljc.java-time.month/from))
en locale specific and borderline deprecated. Consider writing your own regex or use a formatter. For example: (-> (t/formatter "MMM") (cljc.java-time.format.date-time-formatter/parse "Jan") (cljc.java-time.month/from))
(parse-offset-date-time date-str formatter)
to parse an iso-formatted offset-date-time, use (t/offset-date-time "2020..") instead
to parse an iso-formatted offset-date-time, use (t/offset-date-time "2020..") instead
(parse-time date-str formatter)
to parse an iso-formatted time, use (t/time "20:20..") instead
to parse an iso-formatted time, use (t/time "20:20..") instead
(parse-year date-str formatter)
to parse an iso-formatted year, use (t/year "2020") instead
to parse an iso-formatted year, use (t/year "2020") instead
(parse-year-month date-str formatter)
to parse an iso-formatted year-month, use (t/year-month "2020..") instead
to parse an iso-formatted year-month, use (t/year-month "2020..") instead
(parse-zoned-date-time date-str formatter)
to parse an iso-formatted zoned-date-time, use (t/zoned-date-time "2020..") instead
to parse an iso-formatted zoned-date-time, use (t/zoned-date-time "2020..") instead
Returns a lazy seq of times from start (inclusive) to end (exclusive, nil means forever), by step, where start defaults to 0, step to 1, and end to infinity.
Returns a lazy seq of times from start (inclusive) to end (exclusive, nil means forever), by step, where start defaults to 0, step to 1, and end to infinity.
(reset! at newval)
reset! on atomic clock 'at'
reset! on atomic clock 'at'
(reset-vals! at newval)
reset-vals! on atomic clock 'at'
reset-vals! on atomic clock 'at'
(swap! at f & args)
swap! on atomic clock 'at'
swap! on atomic clock 'at'
(swap-vals! at f & args)
swap-vals! on atomic clock 'at'
swap-vals! on atomic clock 'at'
(tick-resolution clk)
(tick-resolution clk dur)
Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration.
Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration.
(truncate x u)
Returns a copy of x truncated to the specified unit.
Returns a copy of x truncated to the specified unit.
(units x)
the units contained within TemporalAmount x.
Seconds and nanos for Duration. Years, months, days for Period
the units contained within TemporalAmount x. Seconds and nanos for Duration. Years, months, days for Period
(with t adj)
(with t fld new-value)
Adjust a temporal with an adjuster or field
Adjust a temporal with an adjuster or field
(with-clock clock & body)
temporarily change ambient now+zone info the given 'clock' could be an Instant, zone or zoned-date-time
temporarily change ambient now+zone info the given 'clock' could be an Instant, zone or zoned-date-time
(year-month)
(year-month v)
extract year-month from v
extract year-month from v
(year-month? v)
true if v is a year-month?
true if v is a year-month?
(zone-offset offset)
(zone-offset hours minutes)
(zone-offset hours minutes seconds)
(zone-offset? v)
true if v is a zone-offset?
true if v is a zone-offset?
(zoned-date-time? v)
true if v is a zoned-date-time?
true if v is a zoned-date-time?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close