Liking cljdoc? Tell your friends :D

java-time.core


after?

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

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

Amountprotocol

abs
(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
(negate a)

Negates a temporal amount:

(negate (negate x)) == x

Negates a temporal amount:

(negate (negate x)) == x

negative?
(negative? a)

True if the amount is negative

True if the amount is negative

zero?
(zero? a)

True if the amount is zero

True if the amount is zero

source

Asprotocol

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

source

as

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

before?

(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...
sourceraw docstring

HasChronologyprotocol

chronology
(chronology o)

The Chronology of the entity

The `Chronology` of the entity

source

HasFieldsprotocol

field*
(field* o k)

Internal use

Internal use

fields
(fields o)

Fields present in this temporal entity

Fields present in this temporal entity

source

HasPropertiesprotocol

properties
(properties o)

Map of properties present in this temporal entity

Map of properties present in this temporal entity

property
(property o k)

Property of this temporal entity under key k

Property of this temporal entity under key `k`

source

HasUnitsprotocol

unit*
(unit* o k)

Internal use

Internal use

units
(units o)

Units present in this temporal entity.

Units present in this temporal entity.

source

HasZoneprotocol

with-zone
(with-zone o z)

Returns this temporal entity with the specified ZoneId

Returns this temporal entity with the specified `ZoneId`

source

KnowsIfLeapprotocol

leap?
(leap? o)

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

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

source

KnowsTimeBetweenprotocol

time-between
(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

source

max

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

min

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

minus

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

Minusableprotocol

Internal

Internal
seq-minus
(seq-minus o os)
sourceraw docstring

Multipliableprotocol

multiply-by
(multiply-by o v)

Entity o mutlitplied by the value v

Entity `o` mutlitplied by the value `v`

source

Orderedprotocol

single-after?
(single-after? a b)

Internal use

Internal use

single-before?
(single-before? a b)

Internal use

Internal use

source

plus

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

Plusableprotocol

Internal

Internal
seq-plus
(seq-plus o os)
sourceraw docstring

readable-range-property-fns

source

ReadablePropertyprotocol

value
(value p)

Value of the property

Value of the property

source

ReadableRangePropertyprotocol

largest-min-value
(largest-min-value p)

Largest minimum value of this property

Largest minimum value of this property

max-value
(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
(min-value p)

Minimum value of this property

Minimum value of this property

range
(range p)

Range of values for this property

Range of values for this property

smallest-max-value
(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

source

Supportingprotocol

supports?
(supports? o p)

True if the o entity supports the p property

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

source

Truncatableprotocol

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

source

WritablePropertyprotocol

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

source

WritableRangePropertyprotocol

with-largest-min-value
(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
(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
(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
(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

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close