(after? x)
(after? x y)
(after? x y & more)
Returns a truthy value if time entities are ordered from the latest to the
earliest (same semantics as >
):
(after? (local-date 2011) (local-date 2010) (local-date 2009)) => truthy...
(after? (instant 99999999) (interval (instant 10000) (instant 1000000))) => truthy...
Returns a truthy value if time entities are ordered from the latest to the earliest (same semantics as `>`): (after? (local-date 2011) (local-date 2010) (local-date 2009)) => truthy... (after? (instant 99999999) (interval (instant 10000) (instant 1000000))) => truthy...
(abs a)
Returns the absolute value of a temporal amount:
(abs (negate x)) == (abs x)
Returns the absolute value of a temporal amount: (abs (negate x)) == (abs x)
(negate a)
Negates a temporal amount:
(negate (negate x)) == x
Negates a temporal amount: (negate (negate x)) == x
(negative? a)
True if the amount is negative
True if the amount is negative
(zero? a)
True if the amount is zero
True if the amount is zero
(as* o k)
Value of property/unit identified by key/object k
of the temporal
entity o
Value of property/unit identified by key/object `k` of the temporal entity `o`
(as o k)
(as o k1 k2)
(as o k1 k2 & ks)
Values of property/unit identified by keys/objects ks
of the temporal
entity o
, e.g.
(as (duration 1 :hour) :minutes) => 60
(as (local-date 2015 9) :year :month-of-year) => [2015 9]
Values of property/unit identified by keys/objects `ks` of the temporal entity `o`, e.g. (as (duration 1 :hour) :minutes) => 60 (as (local-date 2015 9) :year :month-of-year) => [2015 9]
(before? x)
(before? x y)
(before? x y & more)
Returns a truthy value if time entities are ordered from the earliest to the
latest (same semantics as <
):
(before? (local-date 2009) (local-date 2010) (local-date 2011)) => truthy...
(before? (interval (instant 10000) (instant 1000000)) (instant 99999999)) => truthy...
Returns a truthy value if time entities are ordered from the earliest to the latest (same semantics as `<`): (before? (local-date 2009) (local-date 2010) (local-date 2011)) => truthy... (before? (interval (instant 10000) (instant 1000000)) (instant 99999999)) => truthy...
(chronology o)
The Chronology
of the entity
The `Chronology` of the entity
(field* o k)
Internal use
Internal use
(fields o)
Fields present in this temporal entity
Fields present in this temporal entity
(properties o)
Map of properties present in this temporal entity
Map of properties present in this temporal entity
(property o k)
Property of this temporal entity under key k
Property of this temporal entity under key `k`
(unit* o k)
Internal use
Internal use
(units o)
Units present in this temporal entity.
Units present in this temporal entity.
(with-zone o z)
Returns this temporal entity with the specified ZoneId
Returns this temporal entity with the specified `ZoneId`
(leap? o)
True if the year of this entity is a leap year.
True if the year of this entity is a leap year.
(time-between o e u)
Time between temporal entities o
and e
in unit u
.
(j/time-between (j/local-date 2015) (j/local-date 2016) :days) => 365
(j/time-between :days (j/local-date 2015) (j/local-date 2016)) => 365
Time between temporal entities `o` and `e` in unit `u`. (j/time-between (j/local-date 2015) (j/local-date 2016) :days) => 365 (j/time-between :days (j/local-date 2015) (j/local-date 2016)) => 365
(max o & os)
Latest/longest of the given time entities. Entities should be of the same type
Latest/longest of the given time entities. Entities should be of the same type
(min o & os)
Earliest/shortest of the given time entities. Entities should be of the same type
Earliest/shortest of the given time entities. Entities should be of the same type
(minus o & os)
Subtracts all of the os
from the time entity o
(j/minus (j/local-date 2015) (j/years 1)) => <java.time.LocalDate "2014-01-01">
Subtracts all of the `os` from the time entity `o` (j/minus (j/local-date 2015) (j/years 1)) => <java.time.LocalDate "2014-01-01">
(multiply-by o v)
Entity o
mutlitplied by the value v
Entity `o` mutlitplied by the value `v`
Similar to before?
, but also returns truthy if the inputs are equal.
Similar to [[before?]], but also returns truthy if the inputs are equal.
Similar to after?
, but also returns truthy if the inputs are equal.
Similar to [[after?]], but also returns truthy if the inputs are equal.
(single-after? a b)
Internal use
Internal use
(single-before? a b)
Internal use
Internal use
(plus o & os)
Adds all of the os
to the time entity o
. plus
is not commutative, the
first argument is always the entity which will accumulate the rest of the
arguments.
(j/plus (j/local-date 2015) (j/years 1)) => <java.time.LocalDate "2016-01-01">
Adds all of the `os` to the time entity `o`. `plus` is not commutative, the first argument is always the entity which will accumulate the rest of the arguments. (j/plus (j/local-date 2015) (j/years 1)) => <java.time.LocalDate "2016-01-01">
(largest-min-value p)
Largest minimum value of this property
Largest minimum value of this property
(max-value p)
Maximum value of this property, e.g. 29th of February for months
Maximum value of this property, e.g. 29th of February for months
(min-value p)
Minimum value of this property
Minimum value of this property
(range p)
Range of values for this property
Range of values for this property
(smallest-max-value p)
Smallest maximum value of this property, e.g. 28th of February for months
Smallest maximum value of this property, e.g. 28th of February for months
(supports? o p)
True if the o
entity supports the p
property
True if the `o` entity supports the `p` property
(truncate-to o u)
Truncates this entity to the specified time unit. Only works for units that
divide into the length of standard day without remainder (up to :days
).
Truncates this entity to the specified time unit. Only works for units that divide into the length of standard day without remainder (up to `:days`).
(with-value p v)
Underlying temporal entity with the value of this property set to v
Underlying temporal entity with the value of this property set to `v`
(with-largest-min-value p)
Underlying temporal entity with the value set to the largest minimum available for this property
Underlying temporal entity with the value set to the largest minimum available for this property
(with-max-value p)
Underlying temporal entity with the value set to the maximum available for this property
Underlying temporal entity with the value set to the maximum available for this property
(with-min-value p)
Underlying temporal entity with the value set to the minimum available for this property
Underlying temporal entity with the value set to the minimum available for this property
(with-smallest-max-value p)
Underlying temporal entity with the value set to the smallest maximum available for this property
Underlying temporal entity with the value set to the smallest maximum available for this property
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close