Liking cljdoc? Tell your friends :D

tupelo.java-time


*zone-id*clj

source

->zoned-date-timeclj

(->zoned-date-time arg)

Coerces a org.joda.time.ReadableInstant to java.time.ZonedDateTime

Coerces a org.joda.time.ReadableInstant to java.time.ZonedDateTime
sourceraw docstring

DateTimeStampclj

source

fixed-time-point?clj

(fixed-time-point? it)

Returns true iff arg represents a fixed point in time. Examples:

[java.time ZonedDateTime Instant] [org.joda.time DateTime Instant ReadableInstant]

Returns true iff arg represents a fixed point in time. Examples:

[java.time       ZonedDateTime  Instant]
[org.joda.time        DateTime  Instant  ReadableInstant]
sourceraw docstring

instantclj

(instant)

Wrapper for java.time.Instant/now

Wrapper for java.time.Instant/now 
sourceraw docstring

instant?clj

(instant? it)

Returns true iff arg is an instance of java.time.Instant

Returns true iff arg is an instance of java.time.Instant 
sourceraw docstring

intervalclj

(interval start stop)
(interval start stop type)

Returns a map representing an interval in time. Usage:

(interval start stop) ; default type => :half-open (interval start stop type) ; type one of [:open :half-open :closed]

Returns a map representing an interval in time. Usage:

(interval start stop)           ; default type => :half-open
(interval start stop type)      ; type one of [:open :half-open :closed]
sourceraw docstring

interval-contains?clj

(interval-contains? interval time)

Returns true iff the interval contains the instant in time

Returns true iff the interval contains the instant in time
sourceraw docstring

interval?clj

(interval? it)

Returns true iff the arg represents an interval

Returns true iff the arg represents an interval
sourceraw docstring

iso-date-strcljdeprecated

(iso-date-str & args)

DEPRECATED: use string-date-iso

DEPRECATED: use `string-date-iso`
sourceraw docstring

iso-date-time-strcljdeprecated

(iso-date-time-str & args)

DEPRECATED: use string-date-time-iso

DEPRECATED: use `string-date-time-iso`
sourceraw docstring

iso-str->millisclj

(iso-str->millis iso-datetime-str)

Inputs: [iso-datetime-str :- s/Str]

Convert an ISO 8601 string to a java.sql.Date

Inputs: [iso-datetime-str :- s/Str]

Convert an ISO 8601 string to a java.sql.Date
sourceraw docstring

iso-str->timestampclj

(iso-str->timestamp iso-datetime-str)

Inputs: [iso-datetime-str :- s/Str]

Convert an ISO 8601 string to a java.sql.Date

Inputs: [iso-datetime-str :- s/Str]

Convert an ISO 8601 string to a java.sql.Date
sourceraw docstring

joda-instant?clj

(joda-instant? it)

Returns true iff arg is an instance of org.joda.time.ReadableInstant

Returns true iff arg is an instance of org.joda.time.ReadableInstant 
sourceraw docstring

millis->instantclj

(millis->instant millis)

Wrapper for java.time.Instant/ofEpochMilli

Wrapper for java.time.Instant/ofEpochMilli 
sourceraw docstring

now->instantclj

(now->instant)

Returns the current time as a java.lang.Instant

Returns the current time as a java.lang.Instant
sourceraw docstring

now->iso-strclj

(now->iso-str)

Returns an ISO string representation of the current time, like '2019-02-19T18:44:01.123456Z'

Returns an ISO string representation of the current time,
like '2019-02-19T18:44:01.123456Z' 
sourceraw docstring

now->iso-str-simpleclj

(now->iso-str-simple)

Returns a canonical string representation of the current time truncated to the current second, like '2019-02-19 18:44:01Z'

Returns a canonical string representation of the current time truncated to the current second,
like '2019-02-19 18:44:01Z' 
sourceraw docstring

now->zdtclj

(now->zdt)

Returns the current time as a java.lang.ZonedDateTime (UTC)

Returns the current time as a java.lang.ZonedDateTime (UTC)
sourceraw docstring

parse-iso-str-niceclj

(parse-iso-str-nice iso-str)

Inputs: [iso-str :- s/Str] Returns: Instant

Parse a near-iso string like '2019-09-19 18:09:35Z' (it is missing the 'T' between the date & time fields) into an Instant

Inputs: [iso-str :- s/Str]
Returns: Instant

Parse a near-iso string like '2019-09-19 18:09:35Z' (it is missing the 'T' between the
date & time fields) into an Instant
sourceraw docstring

period?clj

(period? it)

Returns true iff arg is an instance of org.joda.time.ReadablePeriod. Example: (period (days 3)) => true

Returns true iff arg is an instance of org.joda.time.ReadablePeriod.
Example:  (period (days 3)) => true 
sourceraw docstring

rangeclj

(range start-inst stop-inst step-dur)

Returns a vector of instants in the half-open interval [start stop) (both instants) with increment <step> (a period). Not lazy. Example:

 (range (zoned-date-time 2018 9 1)
        (zoned-date-time 2018 9 5)
        (Duration/ofDays 1)))  => <vector of 4 ZonedDateTime's from 2018-9-1 thru 2018-9-4>
Returns a vector of instants in the half-open interval [start stop) (both instants)
with increment <step> (a period). Not lazy.  Example:

     (range (zoned-date-time 2018 9 1)
            (zoned-date-time 2018 9 5)
            (Duration/ofDays 1)))  => <vector of 4 ZonedDateTime's from 2018-9-1 thru 2018-9-4>
sourceraw docstring

same-instant?clj

(same-instant? this & others)

Returns true iff two ZonedDateTime objects represent the same instant of time, regardless of time zone. A thin wrapper over ZonedDateTime/isEqual

Returns true iff two ZonedDateTime objects represent the same instant of time, regardless of time zone.
A thin wrapper over `ZonedDateTime/isEqual`
sourceraw docstring

secs->instantclj

(secs->instant secs)

Wrapper for java.time.Instant/ofEpochSecs

Wrapper for java.time.Instant/ofEpochSecs 
sourceraw docstring

string-date-compactclj

(string-date-compact timestamp)

Returns a compact date-time string like 2018-09-05 23:05:19.123Z => 20180905

Returns a compact date-time string like `2018-09-05 23:05:19.123Z` => `20180905` 
sourceraw docstring

string-date-isoclj

(string-date-iso zdt)

Returns a string like 2018-09-05

Returns a string like `2018-09-05`
sourceraw docstring

string-date-time-compactclj

(string-date-time-compact timestamp)

Returns a compact date-time string like 2018-09-05 23:05:19.123Z => 20180905-230519

Returns a compact date-time string like `2018-09-05 23:05:19.123Z` => `20180905-230519` 
sourceraw docstring

string-date-time-hyphensclj

(string-date-time-hyphens timestamp)

Returns a compact date-time string like 2018-09-05 23:05:19.123Z => 2018-09-05-23-05-19

Returns a compact date-time string like `2018-09-05 23:05:19.123Z` => `2018-09-05-23-05-19` 
sourceraw docstring

string-date-time-isoclj

(string-date-time-iso timestamp)

Returns a ISO date-time string like 2018-09-05T23:05:19.123Z

Returns a ISO date-time string like `2018-09-05T23:05:19.123Z`
sourceraw docstring

string-date-time-niceclj

(string-date-time-nice timestamp)

Returns an ISO date-time string like 2018-09-05 23:05:19.123Z (with a space instead of T)

Returns an ISO date-time string like `2018-09-05 23:05:19.123Z`
(with a space instead of `T`)
sourceraw docstring

stringify-timesclj

(stringify-times form)

Will recursively walk any data structure, converting any fixed-time-point? object to a string

Will recursively walk any data structure, converting any `fixed-time-point?` object to a string
sourceraw docstring

temporal?clj

(temporal? it)

Returns true iff arg is an instance of java.time.temporal.Temporal

Returns true iff arg is an instance of java.time.temporal.Temporal 
sourceraw docstring

ToInstantcljprotocol

->instantclj

(->instant arg)
source

trunc-to-dayclj

(trunc-to-day zdt)

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the day.

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the day.
sourceraw docstring

trunc-to-friday-midnightclj

(trunc-to-friday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Friday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Friday at or before T.
sourceraw docstring

trunc-to-hourclj

(trunc-to-hour zdt)

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the hour.

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the hour.
sourceraw docstring

trunc-to-minuteclj

(trunc-to-minute zdt)

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the minute.

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the minute.
sourceraw docstring

trunc-to-monday-midnightclj

(trunc-to-monday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Monday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Monday at or before T.
sourceraw docstring

trunc-to-monthclj

(trunc-to-month zdt)

Inputs: [zdt :- ZonedDateTime]

Returns a ZonedDateTime truncated to first instant of the month.

Inputs: [zdt :- ZonedDateTime]

Returns a ZonedDateTime truncated to first instant of the month.
sourceraw docstring

trunc-to-saturday-midnightclj

(trunc-to-saturday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Saturday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Saturday at or before T.
sourceraw docstring

trunc-to-secondclj

(trunc-to-second zdt)

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the second.

Inputs: [zdt :- DateTimeStamp]

Returns a ZonedDateTime truncated to first instant of the second.
sourceraw docstring

trunc-to-sunday-midnightclj

(trunc-to-sunday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Sunday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Sunday at or before T.
sourceraw docstring

trunc-to-thursday-midnightclj

(trunc-to-thursday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first thursday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first thursday at or before T.
sourceraw docstring

trunc-to-tuesday-midnightclj

(trunc-to-tuesday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Tuesday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Tuesday at or before T.
sourceraw docstring

trunc-to-wednesday-midnightclj

(trunc-to-wednesday-midnight temporal)

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Wednesday at or before T.

Inputs: [temporal :- Temporal]

For an instant T, truncate time to midnight and return the first Wednesday at or before T.
sourceraw docstring

trunc-to-yearclj

(trunc-to-year zdt)

Inputs: [zdt :- ZonedDateTime]

Returns a ZonedDateTime truncated to first instant of the year.

Inputs: [zdt :- ZonedDateTime]

Returns a ZonedDateTime truncated to first instant of the year.
sourceraw docstring

walk-instant->strclj

(walk-instant->str tree)

Walks a tree-like data structure, calling .toString on any instances java.time.Instant

Walks a tree-like data structure, calling `.toString` on any instances java.time.Instant
sourceraw docstring

walk-instant->timestampclj

(walk-instant->timestamp tree)

Walks a tree-like data structure, converting any instances of java.sql.Timestamp => java.time.Instant

Walks a tree-like data structure, converting any instances of java.sql.Timestamp => java.time.Instant
sourceraw docstring

walk-timestamp->instantclj

(walk-timestamp->instant tree)

Walks a tree-like data structure, converting any instances of java.sql.Timestamp => java.time.Instant

Walks a tree-like data structure, converting any instances of java.sql.Timestamp => java.time.Instant
sourceraw docstring

with-zoneidcljmacro

(with-zoneid zone-id & forms)
source

zoned-date-timeclj

(zoned-date-time)
(zoned-date-time year)
(zoned-date-time year month)
(zoned-date-time year month day)
(zoned-date-time year month day hour)
(zoned-date-time year month day hour minute)
(zoned-date-time year month day hour minute second)
(zoned-date-time year month day hour minute second nanos)
(zoned-date-time year month day hour minute second nanos zone-id)

Returns a java.time.ZonedDateTime with the specified parameters and truncated values (day/month=1, hour/minute/sec=0) for all other date/time components. Assumes time zone is UTC unless the maximum-arity constructor is used. Usage:

; Assumes UTC time zone (zoned-date-time) => current time (zoned-date-time year) (zoned-date-time year month) (zoned-date-time year month day) (zoned-date-time year month day hour) (zoned-date-time year month day hour minute) (zoned-date-time year month day hour minute second) (zoned-date-time year month day hour minute second nanos)

; Explicit time zone (zoned-date-time year month day hour minute second nanos zone-id)

; Explicit time zone alternate shortcut arities. (with-zoneid zoneid-us-eastern (zoned-date-time year month day ...)) ; any arity w/o zone-id

Returns a java.time.ZonedDateTime with the specified parameters and truncated values (day/month=1, hour/minute/sec=0)
for all other date/time components. Assumes time zone is UTC unless the maximum-arity constructor is used. Usage:

; Assumes UTC time zone
(zoned-date-time)          => current time
(zoned-date-time year)
(zoned-date-time year month)
(zoned-date-time year month day)
(zoned-date-time year month day hour)
(zoned-date-time year month day hour minute)
(zoned-date-time year month day hour minute second)
(zoned-date-time year month day hour minute second nanos)

; Explicit time zone
(zoned-date-time year month day hour minute second nanos zone-id)

; Explicit time zone alternate shortcut arities.
(with-zoneid zoneid-us-eastern
  (zoned-date-time year month day ...))  ; any arity w/o zone-id

sourceraw docstring

zoned-date-time?clj

(zoned-date-time? it)

Returns true iff arg is an instance of java.time.ZonedDateTime

Returns true iff arg is an instance of java.time.ZonedDateTime
sourceraw docstring

zoneid-us-alaskaclj

source

zoneid-us-aleutianclj

source

zoneid-us-centralclj

source

zoneid-us-easternclj

source

zoneid-us-hawaiiclj

source

zoneid-us-mountainclj

source

zoneid-us-pacificclj

source

zoneid-utcclj

source

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

× close