X Tutup
Liking cljdoc? Tell your friends :D

java-time.core


after?clj

(after? x)
(after? x y)
(after? x y & more)

Returns non-nil if time entities are ordered from the earliest to the latest (same semantics as >):

(after? (local-date 2011) (local-date 2010) (local-date 2009)) => truthy...

(after? (instant 99999999) (interval (instant 10000) (instant 1000000))) => truthy...

Returns non-nil if time entities are ordered from the earliest to the latest
(same semantics as `>`):

  (after? (local-date 2011) (local-date 2010) (local-date 2009))
  => truthy...

  (after? (instant 99999999)
          (interval (instant 10000) (instant 1000000)))
  => truthy...
raw docstring

Amountcljprotocol

absclj

(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)

negateclj

(negate a)

Negates a temporal amount:

(negate (negate x)) == x

Negates a temporal amount:

(negate (negate x)) == x

negative?clj

(negative? a)

True if the amount is negative

True if the amount is negative

zero?clj

(zero? a)

True if the amount is zero

True if the amount is zero

Ascljprotocol

as*clj

(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`

asclj

(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]
raw docstring

before?clj

(before? x)
(before? x y)
(before? x y & more)

Returns non-nil 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 non-nil 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...
raw docstring

HasChronologycljprotocol

chronologyclj

(chronology o)

The Chronology of the entity

The `Chronology` of the entity

HasFieldscljprotocol

field*clj

(field* o k)

Internal use

Internal use

fieldsclj

(fields o)

Fields present in this temporal entity

Fields present in this temporal entity

HasPropertiescljprotocol

propertiesclj

(properties o)

Map of properties present in this temporal entity

Map of properties present in this temporal entity

propertyclj

(property o k)

Property of this temporal entity under key k

Property of this temporal entity under key `k`

HasUnitscljprotocol

unit*clj

(unit* o k)

Internal use

Internal use

unitsclj

(units o)

Units present in this temporal entity.

Units present in this temporal entity.

HasZonecljprotocol

with-zoneclj

(with-zone o z)

Returns this temporal entity with the specified ZoneId

Returns this temporal entity with the specified `ZoneId`

KnowsIfLeapcljprotocol

leap?clj

(leap? o)

True if the year of this entity is a leap year.

True if the year of this entity is a leap year.

KnowsTimeBetweencljprotocol

time-betweenclj

(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

maxclj

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

minclj

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

minusclj

(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">
raw docstring

Minusablecljprotocol

Internal

Internal

seq-minusclj

(seq-minus o os)
raw docstring

Multipliablecljprotocol

multiply-byclj

(multiply-by o v)

Entity o mutlitplied by the value v

Entity `o` mutlitplied by the value `v`

Orderedcljprotocol

single-after?clj

(single-after? a b)

Internal use

Internal use

single-before?clj

(single-before? a b)

Internal use

Internal use

plusclj

(plus o & os)

Adds all of the os to the time entity o

(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`

(j/plus (j/local-date 2015) (j/years 1))
=> <java.time.LocalDate "2016-01-01">
raw docstring

Plusablecljprotocol

Internal

Internal

seq-plusclj

(seq-plus o os)
raw docstring

readable-range-property-fnsclj


ReadablePropertycljprotocol

valueclj

(value p)

Value of the property

Value of the property

ReadableRangePropertycljprotocol

largest-min-valueclj

(largest-min-value p)

Largest minimum value of this property

Largest minimum value of this property

max-valueclj

(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-valueclj

(min-value p)

Minimum value of this property

Minimum value of this property

rangeclj

(range p)

Range of values for this property

Range of values for this property

smallest-max-valueclj

(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

Supportingcljprotocol

supports?clj

(supports? o p)

True if the o entity supports the p property

True if the `o` entity supports the `p` property

Truncatablecljprotocol

truncate-toclj

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

WritablePropertycljprotocol

with-valueclj

(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`

WritableRangePropertycljprotocol

with-largest-min-valueclj

(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-valueclj

(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-valueclj

(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-valueclj

(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 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
X Tutup