(->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.
(->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.
(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.
(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.
(ago n)
Returns a Date some time (n) before now.
Returns a Date some time (n) before now.
(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.
(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.
(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.
(bounds start end)
(bounds? thing)
(day datetime)
Returns the Date's day (local timezone).
Returns the Date's day (local timezone).
(days-in-month year month)
(during? bounds instant)
(end-of bounds)
(formatter format)
(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)
(from-now n)
Returns a Date some time (n) after now.
Returns a Date some time (n) after now.
(hour datetime)
Returns the Date's hour (24-hour clock) (local timezone).
Returns the Date's hour (24-hour clock) (local timezone).
(instant? thing)
(leap-year? year)
(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
(millis->seconds millis)
Converts milliseconds to seconds
Converts milliseconds to seconds
(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.
(millis-since-epoch date)
(minutes n)
Converts minutes to milliseconds
Converts minutes to milliseconds
(month datetime)
Returns the Date's month (local timezone).
Returns the Date's month (local timezone).
(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
(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
(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.
(seconds n)
Converts seconds to milliseconds
Converts seconds to milliseconds
(start-of bounds)
(to-calendar datetime)
Converts a Date object into a GregorianCalendar object
Converts a Date object into a GregorianCalendar object
(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:
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
(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
(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)
(year datetime)
Returns the Date's year (local timezone).
Returns the Date's year (local timezone).
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close