Liking cljdoc? Tell your friends :D

c3kit.apron.time


->localclj/s

(->local date)

Returns a new date representing time in the timezone, assuming given date is in UTC timezone.

Returns a new date representing time in the timezone, assuming given date is in UTC timezone.
raw docstring

->utcclj/s

(->utc date)

Returns a new date representing time in UTC timezone, assuming given date is in local timezone.

Returns a new date representing time in UTC timezone, assuming given date is in local timezone.
raw docstring

afterclj/s

(after time & bits)

Fast-forwards the time on a Date object. Expects a Date object as the first argument and a number of milliseconds to fast-forward time by.

Fast-forwards the time on a Date object. Expects a Date object as the first
argument and a number of milliseconds to fast-forward time by.
raw docstring

after?clj/s

(after? first second)

Expects two Date as arguments. The function returns true if the first date comes after the second date and returns false otherwise.

Expects two Date as arguments. The function returns true if the
first date comes after the second date and returns false otherwise.
raw docstring

agoclj/s

(ago n)

Returns a Date some time (n) before now.

Returns a Date some time (n) before now.
raw docstring

beforeclj/s

(before time & bits)

Rewinds the time on a Date object. Expects a Date object as the first argument and a number of milliseconds to rewind time by.

Rewinds the time on a Date object. Expects a Date object as the first
argument and a number of milliseconds to rewind time by.
raw docstring

before?clj/s

(before? first second)

Expects two Dates as arguments. The function returns true if the first date comes before the second date and returns false otherwise.

Expects two Dates as arguments. The function returns true if the
first date comes before the second date and returns false otherwise.
raw docstring

between?clj/s

(between? date start end)

Expects the three Dates as arguments. The first date is the date being evaluated; the second date is the start date; the last date is the end date. The function returns true if the first date is between the start and end dates.

Expects the three Dates as arguments. The first date is the date
being evaluated; the second date is the start date; the last date is the
end date. The function returns true if the first date is between the start
and end dates.
raw docstring

boundsclj/s

(bounds start end)

bounds?clj/s

(bounds? thing)

date-formatsclj/s


dayclj/s

(day datetime)

Returns the Date's day (local timezone).

Returns the Date's day (local timezone).
raw docstring

daysclj/s

(days n)

Converts days to milliseconds

Converts days to milliseconds
raw docstring

during?clj/s

(during? bounds instant)

end-ofclj/s

(end-of bounds)

epochclj/s


formatterclj/s

(formatter format)

from-epochclj/s

(from-epoch millis-since-epoch)

Create Date relative to epoch, adjusted for timezone offset (from-epoch 0)

Create Date relative to epoch, adjusted for timezone offset
(from-epoch 0)
raw docstring

from-nowclj/s

(from-now n)

Returns a Date some time (n) after now.

Returns a Date some time (n) after now.
raw docstring

hourclj/s

(hour datetime)

Returns the Date's hour (24-hour clock) (local timezone).

Returns the Date's hour (24-hour clock) (local timezone).
raw docstring

hoursclj/s

(hours n)

Converts hours to milliseconds

Converts hours to milliseconds
raw docstring

instant?clj/s

(instant? thing)

localclj/s

(local year month day)
(local year month day hour minute)
(local year month day hour minute second)

Create a Date assuming parameters are local timezone. e.g. in AZ: (local 2020 1 1 0 0 0) -> 2020-01-01T07:00:00.000-00:00

Create a Date assuming parameters are local timezone.
e.g. in AZ: (local 2020 1 1 0 0 0) -> 2020-01-01T07:00:00.000-00:00
raw docstring

millis-betweenclj/s

(millis-between a b)

Milliseconds that separate the two times. Negative if b is after a.

Milliseconds that separate the two times.  Negative if b is after a.
raw docstring

millis-since-epochclj/s

(millis-since-epoch date)

millisecondsclj/s

(milliseconds n)

Our atomic unit

Our atomic unit
raw docstring

minuteclj/s

(minute datetime)

Returns the Date's minute.

Returns the Date's minute.
raw docstring

minutesclj/s

(minutes n)

Converts minutes to milliseconds

Converts minutes to milliseconds
raw docstring

monthclj/s

(month datetime)

Returns the Date's month (local timezone).

Returns the Date's month (local timezone).
raw docstring

monthsclj/s

(months n)

Converts a number into a format that the Calendar object understands to be an amount of months

Converts a number into a format that the Calendar object understands to be an amount of months
raw docstring

nowclj/s

(now)

Returns a java.util.Date or js/Date object that represents the current date and time in UTC

Returns a java.util.Date or js/Date object that represents the current date and time in UTC
raw docstring

parseclj/s

(parse format value)

Parses text into a Java Date object. Expects a keyword, string, or SimpleDateFormat object as the first object and a string representing the date as the second argument. The date is assumed to be in UTC.

Parses text into a Java Date object. Expects a keyword, string, or SimpleDateFormat
object as the first object and a string representing the date as the second argument.
The date is assumed to be in UTC.
raw docstring

secclj/s

(sec datetime)

Returns the Date's second.

Returns the Date's second.
raw docstring

secondsclj/s

(seconds n)

Converts seconds to milliseconds

Converts seconds to milliseconds
raw docstring

start-ofclj/s

(start-of bounds)

to-calendarclj

(to-calendar datetime)

Converts a Date object into a GregorianCalendar object

Converts a Date object into a GregorianCalendar object
raw docstring

unparseclj/s

(unparse format value)

Returns a string that is populated with a formatted date and time. Expects the first argument to be the requested format and the second argument to be the date to be formatted. The following are options for the first argument:

  1. Keyword - :http, :rfc1123, :iso8601, :dense
  2. String - must be a valid argument to the SimpleDateFormat Java Object
  3. SimpleDateFormat - Java Object
Returns a string that is populated with a formatted date and time. Expects the
first argument to be the requested format and the second argument to be the date
to be formatted.
The following are options for the first argument:
1. Keyword - :http, :rfc1123, :iso8601, :dense
2. String - must be a valid argument to the SimpleDateFormat Java Object
3. SimpleDateFormat - Java Object
raw docstring

utcclj/s

(utc year month day)
(utc year month day hour minute)
(utc year month day hour minute second)

Create a Date assuming parameters are UTC timezone. e.g. (utc 2020 1 1 0 0 0) -> 2020-01-01T00:00:00.000-00:00

Create a Date assuming parameters are UTC timezone.
e.g. (utc 2020 1 1 0 0 0) -> 2020-01-01T00:00:00.000-00:00
raw docstring

utc-offsetclj/s

(utc-offset)
(utc-offset date)

The offset (milliseconds) between the local timezone and UTC. (AZ -> -7hrs)

The offset (milliseconds) between the local timezone and UTC. (AZ -> -7hrs)
raw docstring

yearclj/s

(year datetime)

Returns the Date's year (local timezone).

Returns the Date's year (local timezone).
raw docstring

yearsclj/s

(years n)

Converts a number into a format that the Calendar object understands to be an amount of years

Converts a number into a format that the Calendar object understands to be an amount of years
raw docstring

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

× close