Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

paprika.time


<clj/s

(< & args)
source

<=clj/s

(<= & args)
source

=clj/s

(= & args)
source

>clj/s

(> & args)
source

>=clj/s

(>= & args)
source

abuts?clj

(abuts? i-a i-b)

Returns true if Interval i-a abuts i-b, i.e. then end of i-a is exactly the beginning of i-b.

Returns true if Interval i-a abuts i-b, i.e. then end of i-a is exactly the
beginning of i-b.
sourceraw docstring

after?clj

(after? this that)

Returns true if ReadableDateTime 'this' is strictly after date/time 'that'.

Returns true if ReadableDateTime 'this' is strictly after date/time 'that'.
sourceraw docstring

agoclj/s≠

clj
(ago period)

Returns a DateTime a supplied period before the present. e.g. (-> 5 years ago)

Returns a DateTime a supplied period before the present.
e.g. (-> 5 years ago)
cljs
source (clj)source (cljs)raw docstring

as-localclj/s

(as-local date)
source (clj)source (cljs)

as-utcclj/s

(as-utc date)
source (clj)source (cljs)

at-midnightcljs

source

available-idsclj

(available-ids)

Returns a set of available IDs for use with time-zone-for-id.

Returns a set of available IDs for use with time-zone-for-id.
sourceraw docstring

before?clj

(before? this that)

Returns true if ReadableDateTime 'this' is strictly before date/time 'that'.

Returns true if ReadableDateTime 'this' is strictly before date/time 'that'.
sourceraw docstring

conversion-errorcljs

source

date-midnightclj/s≠

clj
(date-midnight year)
(date-midnight year month)
(date-midnight year month day)

Constructs and returns a new DateMidnight in UTC. Specify the year, month of year, day of month. Note that month and day are 1-indexed. Any number of least-significant components can be ommited, in which case they will default to 1.

Constructs and returns a new DateMidnight in UTC.
Specify the year, month of year, day of month. Note that month and day are
1-indexed. Any number of least-significant components can be ommited, in which case
they will default to 1.
cljs
source (clj)source (cljs)raw docstring

date-timeclj/s≠

clj
(date-time year)
(date-time year month)
(date-time year month day)
(date-time year month day hour)
(date-time year month day hour minute)
(date-time year month day hour minute second)
(date-time year month day hour minute second millis)

Constructs and returns a new DateTime in UTC. Specify the year, month of year, day of month, hour of day, minute of hour, second of minute, and millisecond of second. Note that month and day are 1-indexed while hour, second, minute, and millis are 0-indexed. Any number of least-significant components can be ommited, in which case they will default to 1 or 0 as appropriate.

Constructs and returns a new DateTime in UTC.
Specify the year, month of year, day of month, hour of day, minute of hour,
second of minute, and millisecond of second. Note that month and day are
1-indexed while hour, second, minute, and millis are 0-indexed.
Any number of least-significant components can be ommited, in which case
they will default to 1 or 0 as appropriate.
cljs
source (clj)source (cljs)raw docstring

date?cljs

source

DateTimeProtocolclj

Interface for various date time functions

Interface for various date time functions
sourceraw docstring

dayclj/s≠

clj
(day this)

Return the day of month component of the given date/time.

Return the day of month component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

day-of-weekclj/s≠

clj
(day-of-week this)

Return the day of week component of the given date/time. Monday is 1 and Sunday is 7

Return the day of week component of the given date/time. Monday is 1 and Sunday is 7
cljs
source (clj)source (cljs)raw docstring

daysclj/s≠

clj
(days)
(days n)

Given a number, returns a Period representing that many days. Without an argument, returns a PeriodType representing only days.

Given a number, returns a Period representing that many days.
Without an argument, returns a PeriodType representing only days.
cljs
source (clj)source (cljs)raw docstring

days?clj/s≠

clj
(days? val)

Returns true if the given value is an instance of Days

Returns true if the given value is an instance of Days
cljs
source (clj)source (cljs)raw docstring

default-ms-fncljs

source

default-time-zoneclj/s≠

clj
(default-time-zone)

Returns the default DateTimeZone for the current environment.

Returns the default DateTimeZone for the current environment.
cljs
source (clj)source (cljs)raw docstring

deprecatedclj/s≠

clj
(deprecated message)
cljs
source (clj)source (cljs)

do-atcljmacro

(do-at base-date-time & body)

Like clojure.core/do except evalautes the expression at the given date-time

Like clojure.core/do except evalautes the expression at the given date-time
sourceraw docstring

do-at*clj/s≠

clj
(do-at* base-date-time body-fn)
cljs
source (clj)source (cljs)

earliestclj/s≠

clj
(earliest dts)
(earliest dt1 dt2)

Returns the earliest of the supplied DateTimes

Returns the earliest of the supplied DateTimes
cljs
source (clj)source (cljs)raw docstring

endclj/s≠

clj
(end in)

Returns the end DateTime of an Interval.

Returns the end DateTime of an Interval.
cljs
source (clj)source (cljs)raw docstring

epochclj/s≠

clj
(epoch)

Returns a DateTime for the beginning of the Unix epoch in the UTC time zone.

Returns a DateTime for the beginning of the Unix epoch in the UTC time zone.
cljs
source (clj)source (cljs)raw docstring

equal?clj

(equal? this that)

Returns true if ReadableDateTime 'this' is strictly equal to date/time 'that'.

Returns true if ReadableDateTime 'this' is strictly equal to date/time 'that'.
sourceraw docstring

extendclj/s≠

clj
(extend in & by)

Returns an Interval with an end ReadableDateTime the specified Period after the end of the given Interval

Returns an Interval with an end ReadableDateTime the specified Period after the end
of the given Interval
cljs
source (clj)source (cljs)raw docstring

first-day-of-the-monthclj/s≠

clj
(first-day-of-the-month dt)
(first-day-of-the-month year month)
cljs
source (clj)source (cljs)

first-day-of-the-month-clj

(first-day-of-the-month- this)

Returns the first day of the month

Returns the first day of the month
sourceraw docstring

floorclj/s≠

clj
(floor dt dt-fn)

Floors the given date-time dt to the given time unit dt-fn, e.g. (floor (now) hour) returns (now) for all units up to and including the hour

Floors the given date-time dt to the given time unit dt-fn,
e.g. (floor (now) hour) returns (now) for all units
up to and including the hour
cljs
source (clj)source (cljs)raw docstring

format-forclj/s

source

from-default-time-zonecljs

source

from-nowclj/s≠

clj
(from-now period)

Returns a DateTime a supplied period after the present. e.g. (-> 30 minutes from-now)

Returns a DateTime a supplied period after the present.
e.g. (-> 30 minutes from-now)
cljs
source (clj)source (cljs)raw docstring

from-sqlclj

(from-sql time)
source

from-stringclj/s

source

from-string-localclj/s

(from-string-local string)
source

from-string-local-macroclj

(from-string-local-macro str)
source

from-string-macroclj/s

(from-string-macro str)
source

from-time-zoneclj

(from-time-zone dt tz)

Returns a new ReadableDateTime corresponding to the same point in calendar time as the given ReadableDateTime, but for a correspondingly different absolute instant in time.

Returns a new ReadableDateTime corresponding to the same point in calendar time as
the given ReadableDateTime, but for a correspondingly different absolute instant in
time.
sourceraw docstring

from-timestamp-local-macroclj

(from-timestamp-local-macro string)
source

from-timestamp-macroclj

(from-timestamp-macro string)
source

from-utc-time-zonecljs

source

hourclj/s≠

clj
(hour this)

Return the hour of day component of the given date/time. A time of 12:01am will have an hour component of 0.

Return the hour of day component of the given date/time. A time of 12:01am will have an hour component of 0.
cljs
source (clj)source (cljs)raw docstring

hoursclj/s≠

clj
(hours)
(hours n)

Given a number, returns a Period representing that many hours. Without an argument, returns a PeriodType representing only hours.

Given a number, returns a Period representing that many hours.
Without an argument, returns a PeriodType representing only hours.
cljs
source (clj)source (cljs)raw docstring

hours?clj/s≠

clj
(hours? val)

Returns true if the given value is an instance of Hours

Returns true if the given value is an instance of Hours
cljs
source (clj)source (cljs)raw docstring

in-daysclj

(in-days this)

Return the time in days.

Return the time in days.
sourceraw docstring

in-hoursclj

(in-hours this)

Return the time in hours.

Return the time in hours.
sourceraw docstring

in-millisclj

(in-millis this)

Return the time in milliseconds.

Return the time in milliseconds.
sourceraw docstring

in-minutesclj

(in-minutes this)

Return the time in minutes.

Return the time in minutes.
sourceraw docstring

in-monthsclj

(in-months this)

Return the time in months

Return the time in months
sourceraw docstring

in-msecscljdeprecated

(in-msecs in)

DEPRECATED: Returns the number of milliseconds in the given Interval.

DEPRECATED: Returns the number of milliseconds in the given Interval.
sourceraw docstring

in-secondsclj

(in-seconds this)

Return the time in seconds.

Return the time in seconds.
sourceraw docstring

in-secscljdeprecated

(in-secs in)

DEPRECATED: Returns the number of standard seconds in the given Interval.

DEPRECATED: Returns the number of standard seconds in the given Interval.
sourceraw docstring

in-weeksclj

(in-weeks this)

Return the time in weeks

Return the time in weeks
sourceraw docstring

in-yearsclj

(in-years this)

Return the time in years

Return the time in years
sourceraw docstring

intervalclj/s≠

clj
(interval dt-a dt-b)

Returns an interval representing the span between the two given ReadableDateTimes. Note that intervals are closed on the left and open on the right.

Returns an interval representing the span between the two given ReadableDateTimes.
Note that intervals are closed on the left and open on the right.
cljs
source (clj)source (cljs)raw docstring

interval?cljs

source

InTimeUnitProtocolclj

Interface for in-<time unit> functions

Interface for in-<time unit> functions
sourceraw docstring

last-day-of-the-monthclj/s≠

clj
(last-day-of-the-month dt)
(last-day-of-the-month year month)
cljs
source (clj)source (cljs)

last-day-of-the-month-clj

(last-day-of-the-month- this)

Returns the last day of the month

Returns the last day of the month
sourceraw docstring

latestclj/s≠

clj
(latest dts)
(latest dt1 dt2)

Returns the latest of the supplied DateTimes

Returns the latest of the supplied DateTimes
cljs
source (clj)source (cljs)raw docstring

local-dateclj/s≠

clj
(local-date year month day)

Constructs and returns a new LocalDate. Specify the year, month, and day. Does not deal with timezones.

Constructs and returns a new LocalDate.
Specify the year, month, and day. Does not deal with timezones.
cljs
source (clj)source (cljs)raw docstring

local-date-timeclj/s≠

clj
(local-date-time year)
(local-date-time year month)
(local-date-time year month day)
(local-date-time year month day hour)
(local-date-time year month day hour minute)
(local-date-time year month day hour minute second)
(local-date-time year month day hour minute second millis)

Constructs and returns a new LocalDateTime. Specify the year, month of year, day of month, hour of day, minute of hour, second of minute, and millisecond of second. Note that month and day are 1-indexed while hour, second, minute, and millis are 0-indexed. Any number of least-significant components can be ommited, in which case they will default to 1 or 0 as appropriate.

Constructs and returns a new LocalDateTime.
Specify the year, month of year, day of month, hour of day, minute of hour,
second of minute, and millisecond of second. Note that month and day are
1-indexed while hour, second, minute, and millis are 0-indexed.
Any number of least-significant components can be ommited, in which case
they will default to 1 or 0 as appropriate.
cljs
source (clj)source (cljs)raw docstring

local-timeclj

(local-time hour)
(local-time hour minute)
(local-time hour minute second)
(local-time hour minute second millis)

Constructs and returns a new LocalTime. Specify the hour of day, minute of hour, second of minute, and millisecond of second. Any number of least-significant components can be ommited, in which case they will default to 1 or 0 as appropriate.

Constructs and returns a new LocalTime.
Specify the hour of day, minute of hour, second of minute, and millisecond of second.
Any number of least-significant components can be ommited, in which case
they will default to 1 or 0 as appropriate.
sourceraw docstring

max-dateclj

(max-date dt & dts)

Maximum of the provided DateTimes.

Maximum of the provided DateTimes.
sourceraw docstring

milliclj/s≠

clj
(milli this)

Return the millisecond of second component of the given date/time.

Return the millisecond of second component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

millisclj/s≠

clj
(millis)
(millis n)

Given a number, returns a Period representing that many milliseconds. Without an argument, returns a PeriodType representing only milliseconds.

Given a number, returns a Period representing that many milliseconds.
Without an argument, returns a PeriodType representing only milliseconds.
cljs
source (clj)source (cljs)raw docstring

min-dateclj

(min-date dt & dts)

Minimum of the provided DateTimes.

Minimum of the provided DateTimes.
sourceraw docstring

mins-agoclj/s≠

clj
(mins-ago d)
cljs
source (clj)source (cljs)

minusclj/s≠

clj
(minus dt p)
(minus dt p & ps)

Returns a new date/time object corresponding to the given date/time moved backwards by the given Period(s).

Returns a new date/time object corresponding to the given date/time moved backwards by
the given Period(s).
cljs
source (clj)source (cljs)raw docstring

minus-clj

(minus- this period)

Returns a new date/time corresponding to the given date/time moved backwards by the given Period(s).

Returns a new date/time corresponding to the given date/time moved backwards by the given Period(s).
sourceraw docstring

minuteclj/s≠

clj
(minute this)

Return the minute of hour component of the given date/time.

Return the minute of hour component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

minutesclj/s≠

clj
(minutes)
(minutes n)

Given a number, returns a Period representing that many minutes. Without an argument, returns a PeriodType representing only minutes.

Given a number, returns a Period representing that many minutes.
Without an argument, returns a PeriodType representing only minutes.
cljs
source (clj)source (cljs)raw docstring

minutes?clj/s≠

clj
(minutes? val)

Returns true if the given value is an instance of Minutes

Returns true if the given value is an instance of Minutes
cljs
source (clj)source (cljs)raw docstring

monthclj/s≠

clj
(month this)

Return the month component of the given date/time.

Return the month component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

monthsclj/s≠

clj
(months)
(months n)

Given a number, returns a Period representing that many months. Without an argument, returns a PeriodType representing only months.

Given a number, returns a Period representing that many months.
Without an argument, returns a PeriodType representing only months.
cljs
source (clj)source (cljs)raw docstring

months?clj/s≠

clj
(months? val)

Returns true if the given value is an instance of Months

Returns true if the given value is an instance of Months
cljs
source (clj)source (cljs)raw docstring

nowclj/s≠

clj
(now)

Returns a DateTime for the current instant in the UTC time zone.

Returns a DateTime for the current instant in the UTC time zone.
cljs
source (clj)source (cljs)raw docstring

nth-day-of-the-monthclj

(nth-day-of-the-month dt n)
(nth-day-of-the-month year month n)

Returns the nth day of the month.

Returns the nth day of the month.
sourceraw docstring

number-of-days-in-the-monthclj/s≠

clj
(number-of-days-in-the-month dt)
(number-of-days-in-the-month year month)
cljs
source (clj)source (cljs)

offset-ms-fncljs

source

overlapclj/s≠

clj
(overlap i-a i-b)

Returns an Interval representing the overlap of the specified Intervals. Returns nil if the Intervals do not overlap. The first argument must not be nil. If the second argument is nil then the overlap of the first argument and a zero duration interval with both start and end times equal to the current time is returned.

Returns an Interval representing the overlap of the specified Intervals.
Returns nil if the Intervals do not overlap.
The first argument must not be nil.
If the second argument is nil then the overlap of the first argument
and a zero duration interval with both start and end times equal to the
current time is returned.
cljs
source (clj)source (cljs)raw docstring

overlaps?clj/s≠

clj
(overlaps? i-a i-b)
(overlaps? start-a end-a start-b end-b)

With 2 arguments: Returns true of the two given Intervals overlap. Note that intervals that satisfy abuts? do not satisfy overlaps? With 4 arguments: Returns true if the range specified by start-a and end-a overlaps with the range specified by start-b and end-b.

With 2 arguments: Returns true of the two given Intervals overlap.
Note that intervals that satisfy abuts? do not satisfy overlaps?
With 4 arguments: Returns true if the range specified by start-a and end-a
overlaps with the range specified by start-b and end-b.
cljs
source (clj)source (cljs)raw docstring

parseclj/s

(parse string format)
source

parse-localclj/s

(parse-local string format)
source

periodcljs

source

period-fncljs

source

period-fnscljs

source

period-type?cljs

source

period?cljs

source

periodscljs

source

plusclj/s≠

clj
(plus dt p)
(plus dt p & ps)

Returns a new date/time corresponding to the given date/time moved forwards by the given Period(s).

Returns a new date/time corresponding to the given date/time moved forwards by
the given Period(s).
cljs
source (clj)source (cljs)raw docstring

plus-clj

(plus- this period)

Returns a new date/time corresponding to the given date/time moved forwards by the given Period(s).

Returns a new date/time corresponding to the given date/time moved forwards by the given Period(s).
sourceraw docstring

secclj/s≠

clj
(sec this)

Return the second of minute component of the given date/time.

Return the second of minute component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

secondclj/s≠

clj
(second this)

Return the second of minute component of the given date/time.

Return the second of minute component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

secondsclj/s≠

clj
(seconds)
(seconds n)

Given a number, returns a Period representing that many seconds. Without an argument, returns a PeriodType representing only seconds.

Given a number, returns a Period representing that many seconds.
Without an argument, returns a PeriodType representing only seconds.
cljs
source (clj)source (cljs)raw docstring

seconds?clj/s≠

clj
(seconds? val)

Returns true if the given value is an instance of Seconds

Returns true if the given value is an instance of Seconds
cljs
source (clj)source (cljs)raw docstring

secscljdeprecated

(secs)
(secs n)

DEPRECATED

DEPRECATED
sourceraw docstring

secs?cljdeprecated

(secs? val)

DEPRECATED

DEPRECATED
sourceraw docstring

startclj/s≠

clj
(start in)

Returns the start DateTime of an Interval.

Returns the start DateTime of an Interval.
cljs
source (clj)source (cljs)raw docstring

static-ms-fncljs

source

Timeclj/s

source

time-nowclj/s≠

clj
(time-now)

Returns a LocalTime for the current instant without date or time zone using ISOChronology in the current time zone.

Returns a LocalTime for the current instant without date or time zone
using ISOChronology in the current time zone.
cljs
source (clj)source (cljs)raw docstring

time-zone-for-idclj

(time-zone-for-id id)

Returns a DateTimeZone for the given ID, which must be in long form, e.g. 'America/Matamoros'.

Returns a DateTimeZone for the given ID, which must be in long form, e.g.
'America/Matamoros'.
sourceraw docstring

time-zone-for-offsetclj/s≠

clj
(time-zone-for-offset hours)
(time-zone-for-offset hours minutes)

Returns a DateTimeZone for the given offset, specified either in hours or hours and minutes.

Returns a DateTimeZone for the given offset, specified either in hours or
hours and minutes.
cljs
source (clj)source (cljs)raw docstring

to-default-time-zonecljs

source

to-localclj/s

(to-local date)
source (clj)source (cljs)

to-sqlclj

source

to-time-zoneclj

(to-time-zone dt tz)

Returns a new ReadableDateTime corresponding to the same absolute instant in time as the given ReadableDateTime, but with calendar fields corresponding to the given TimeZone.

Returns a new ReadableDateTime corresponding to the same absolute instant in time as
the given ReadableDateTime, but with calendar fields corresponding to the given
TimeZone.
sourceraw docstring

to-utcclj/s≠

clj
(to-utc date)
cljs
source (clj)source (cljs)

todayclj/s≠

clj
(today)

Constructs and returns a new LocalDate representing today's date. LocalDate objects do not deal with timezones at all.

Constructs and returns a new LocalDate representing today's date.
LocalDate objects do not deal with timezones at all.
cljs
source (clj)source (cljs)raw docstring

today-atclj/s≠

clj
(today-at hours minutes)
(today-at hours minutes seconds)
(today-at hours minutes seconds millis)
cljs
source (clj)source (cljs)

today-at-midnightclj/s≠

clj
(today-at-midnight)
(today-at-midnight tz)

DEPRECATED: Please use with-time-at-start-of-day instead. See http://goo.gl/nQCmKd Returns a DateMidnight for today at midnight in the UTC time zone.

DEPRECATED: Please use with-time-at-start-of-day instead. See http://goo.gl/nQCmKd
Returns a DateMidnight for today at midnight in the UTC time zone.
cljs
source (clj)source (cljs)raw docstring

unparseclj/s

(unparse date format)
source

unparse-localclj/s

(unparse-local date format)
source

utcclj/s≠

clj

DateTimeZone for UTC.

DateTimeZone for UTC.
source (clj)source (cljs)raw docstring

week-number-of-yearclj/s≠

clj
(week-number-of-year this)

Returs the number of weeks in the year

Returs the number of weeks in the year
cljs
source (clj)source (cljs)raw docstring

weeksclj/s≠

clj
(weeks)
(weeks n)

Given a number, returns a Period representing that many weeks. Without an argument, returns a PeriodType representing only weeks.

Given a number, returns a Period representing that many weeks.
Without an argument, returns a PeriodType representing only weeks.
cljs
source (clj)source (cljs)raw docstring

weeks?clj/s≠

clj
(weeks? val)

Returns true if the given value is an instance of Weeks

Returns true if the given value is an instance of Weeks
cljs
source (clj)source (cljs)raw docstring

with-time-at-start-of-dayclj

(with-time-at-start-of-day dt)

Returns a DateTime representing the start of the day. Normally midnight, but not always true, as in some time zones with daylight savings.

Returns a DateTime representing the start of the day. Normally midnight,
but not always true, as in some time zones with daylight savings.
sourceraw docstring

within?clj/s≠

clj
(within? i dt)
(within? start end test)

With 2 arguments: Returns true if the given Interval contains the given ReadableDateTime. Note that if the ReadableDateTime is exactly equal to the end of the interval, this function returns false. With 3 arguments: Returns true if the start ReadablePartial is equal to or before and the end ReadablePartial is equal to or after the test ReadablePartial.

With 2 arguments: Returns true if the given Interval contains the given
ReadableDateTime. Note that if the ReadableDateTime is exactly equal to the
end of the interval, this function returns false.
With 3 arguments: Returns true if the start ReadablePartial is
equal to or before and the end ReadablePartial is equal to or after the test
ReadablePartial.
cljs
source (clj)source (cljs)raw docstring

yearclj/s≠

clj
(year this)

Return the year component of the given date/time.

Return the year component of the given date/time.
cljs
source (clj)source (cljs)raw docstring

year-monthclj

(year-month year)
(year-month year month)

Constructs and returns a new YearMonth. Specify the year and month of year. Month is 1-indexed and defaults to January (1).

Constructs and returns a new YearMonth.
Specify the year and month of year. Month is 1-indexed and defaults
to January (1).
sourceraw docstring

yearsclj/s≠

clj
(years)
(years n)

Given a number, returns a Period representing that many years. Without an argument, returns a PeriodType representing only years.

Given a number, returns a Period representing that many years.
Without an argument, returns a PeriodType representing only years.
cljs
source (clj)source (cljs)raw docstring

years?clj/s≠

clj
(years? val)

Returns true if the given value is an instance of Years

Returns true if the given value is an instance of Years
cljs
source (clj)source (cljs)raw docstring

yesterdayclj/s≠

clj
(yesterday)

Returns a DateTime for yesterday relative to now

Returns a DateTime for yesterday relative to now
cljs
source (clj)source (cljs)raw docstring

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

× close