Liking cljdoc? Tell your friends :D

cljs-time.core


agocljs

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

date-midnightcljs

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

Constructs and returns a new UtcDateTime at midnight. 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 omitted, in which case they will default to 1.

Constructs and returns a new UtcDateTime at midnight.
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 omitted, in which 
case they will default to 1.
sourceraw docstring

date-timecljs

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

DateTimeProtocolcljsprotocol

Interface for various date time functions

Interface for various date time functions

minutecljs

(minute this)

after?cljs

(after? this that)

hourcljs

(hour this)

daycljs

(day this)

secondcljs

(second this)

plus-cljs

(plus- this period)

day-of-weekcljs

(day-of-week this)

monthcljs

(month this)

before?cljs

(before? this that)

yearcljs

(year this)

minus-cljs

(minus- this period)

millicljs

(milli this)
sourceraw docstring

dayscljs

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

do-at*cljs

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

endcljs

(end in)

Returns the end DateTime of an Interval.

Returns the end DateTime of an Interval.
sourceraw docstring

epochcljs

(epoch)

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

Returns a DateTime for the begining of the Unix epoch in the UTC time zone.
sourceraw docstring

extendcljs

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

first-day-of-the-monthcljs

(first-day-of-the-month dt)
source

fpartialcljs

(fpartial f & args)
source

from-nowcljs

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

hourscljs

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

in-dayscljs

(in-days in)

Returns the number of standard days in the given Interval.

Returns the number of standard days in the given Interval.
sourceraw docstring

in-hourscljs

(in-hours in)

Returns the number of standard hours in the given Interval.

Returns the number of standard hours in the given Interval.
sourceraw docstring

in-milliscljs

(in-millis in)

Returns the number of milliseconds in the given Interval.

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

in-minutescljs

(in-minutes in)

Returns the number of standard minutes in the given Interval.

Returns the number of standard minutes in the given Interval.
sourceraw docstring

in-monthscljs

(in-months in)

Returns the number of standard months in the given Interval.

Returns the number of standard months in the given Interval.
sourceraw docstring

in-secondscljs

(in-seconds in)

Returns the number of standard seconds in the given Interval.

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

in-weekscljs

(in-weeks in)

Returns the number of standard weeks in the given Interval.

Returns the number of standard weeks in the given Interval.
sourceraw docstring

in-yearscljs

(in-years in)

Returns the number of standard years in the given Interval.

Returns the number of standard years in the given Interval.
sourceraw docstring

intervalcljs

(interval dt-a dt-b)
source

last-day-of-the-monthcljs

(last-day-of-the-month dt)
source

local-datecljs

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

local-date-timecljs

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

Mappablecljsprotocol

instant->mapcljs

(instant->map instant)
source

mins-agocljs

(mins-ago d)
source

minuscljs

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

minutescljs

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

monthscljs

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

nowcljs

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

number-of-days-in-the-monthcljs

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

overlaps?cljs

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

pluscljs

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

secondscljs

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

startcljs

(start in)

Returns the start DateTime of an Interval.

Returns the start DateTime of an Interval.
sourceraw docstring

time-zone-for-idcljs

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

(time-zone-for-offset hours)

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

to-periodcljs

(to-period in)
source

todaycljs

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

today-atcljs

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

today-at-midnightcljs

(today-at-midnight)

Returns a DateMidnight for today at midnight in the UTC time zone.

Returns a DateMidnight for today at midnight in the UTC time zone.
sourceraw docstring

weekscljs

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

within?cljs

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

yearscljs

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

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

× close