(< date & more)
Returns true if dates are in monotonically increasing order, otherwise false.
Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
Returns true if dates are in monotonically increasing order, otherwise false. Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
(<= date & more)
Returns true if dates are in monotonically non-decreasing order, otherwise false.
Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
Returns true if dates are in monotonically non-decreasing order, otherwise false. Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
(> date & more)
Returns true if dates are in monotonically decreasing order, otherwise false.
Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
Returns true if dates are in monotonically decreasing order, otherwise false. Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
(>= date & more)
Returns true if dates are in monotonically non-increasing order, otherwise false.
Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
Returns true if dates are in monotonically non-increasing order, otherwise false. Arguments are date instances of any type (e.g. timestamp, java-date, date/time etc.)
(beginning-of-day & args__2042__auto__)
Compatibility alias for start-of-day-local
Compatibility alias for start-of-day-local
(beginning-of-month & args__2042__auto__)
Compatibility alias for start-of-month-local
Compatibility alias for start-of-month-local
(day date)
Return the day of month component of the given date.
'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
Return the day of month component of the given date. 'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
(days n)
Given a number, returns a Period representing that many days.
Given a number, returns a Period representing that many days.
(days-in-month date)
(days-in-month date timezone)
Takes a date
in UTC time and returns the number of days in the month of the local time in timezone
the date represents.
Takes a `date` in UTC time and returns the number of days in the month of the local time in `timezone` the date represents.
(defdeprecated old new)
Helper macro to def deprecated functions and invoke the new implementation. Taken from leiningen: https://github.com/technomancy/leiningen/commit/6e18fc495d485acb6942d08f3719a644f697bf27
Helper macro to def deprecated functions and invoke the new implementation. Taken from leiningen: https://github.com/technomancy/leiningen/commit/6e18fc495d485acb6942d08f3719a644f697bf27
(end-of-day & args__2042__auto__)
Compatibility alias for end-of-day-local
Compatibility alias for end-of-day-local
(end-of-day-local date)
(end-of-day-local date tz)
Given a date
in local time UTC, returns a new date representing the time 23:59:59 in timezone 'tz'
of the same day.
Arity 1: Adjust date
to UTC (will be unchanged when input date is in UTC).
Arity 2: Adjust date
with respect to timezone tz
.
'date' is a date instance as per 'toolbelt.date/transform'.
Given a `date` in local time UTC, returns a new date representing the time 23:59:59 in timezone 'tz' of the same day. Arity 1: Adjust `date` to UTC (will be unchanged when input date is in UTC). Arity 2: Adjust `date` with respect to timezone `tz`. 'date' is a date instance as per 'toolbelt.date/transform'.
(end-of-day-utc date)
(end-of-day-utc date timezone)
(end-of-day-utc date from-tz to-tz)
Takes a 'date' in UTC time representing a time in 'timezone', and returns a UTC corrected date representing the end of day of the local date in 'timezone'.
Note: Will convert 'date' to local time in 'timezone' before calculating end of day, input should be in UTC.
E.g.
'date' represents Oct 12 at 23:00 in Pacific time so the input will be Oct 13 at 06:00.
Returned will be Oct 13 at 06:59:59, which represents end of day of Oct 12 in Pacific time 'timezone'.
Arity 1: Adjust date
from and to UTC timezone.
Arity 2: Adjust date
from and to the supplied timezone
.
Arity 3: Adjust date
from from-tz
and return a new date represented in to-tz
.
Takes a 'date' in UTC time representing a time in 'timezone', and returns a UTC corrected date representing the end of day of the local date in 'timezone'. Note: Will convert 'date' to local time in 'timezone' before calculating end of day, input should be in UTC. E.g. 'date' represents Oct 12 at 23:00 in Pacific time so the input will be Oct 13 at 06:00. Returned will be Oct 13 at 06:59:59, which represents end of day of Oct 12 in Pacific time 'timezone'. Arity 1: Adjust `date` from and to UTC timezone. Arity 2: Adjust `date` from and to the supplied `timezone`. Arity 3: Adjust `date` from `from-tz` and return a new date represented in `to-tz`.
(end-of-month & args__2042__auto__)
Compatibility alias for end-of-month-local
Compatibility alias for end-of-month-local
(end-of-month-local date)
(end-of-month-local date tz)
Given a date
in local time UTC, returns a new date representing the last of the month at 23:59:59 in timezone 'tz'
of the same month.
Arity 1: Adjust date
to UTC (will be unchanged when input date is in UTC).
Arity 2: Adjust date
with respect to timezone tz
.
'date' is a date instance as per 'toolbelt.date/transform'.
Given a `date` in local time UTC, returns a new date representing the last of the month at 23:59:59 in timezone 'tz' of the same month. Arity 1: Adjust `date` to UTC (will be unchanged when input date is in UTC). Arity 2: Adjust `date` with respect to timezone `tz`. 'date' is a date instance as per 'toolbelt.date/transform'.
(end-of-month-utc date)
(end-of-month-utc date timezone)
(end-of-month-utc date from-tz to-tz)
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected end of the month of the local date in 'timezone'.
Note: Will convert 'date' to local time in 'timezone' before calculating start of month, input should be in UTC.
E.g.
'date' represents Oct 31 at 23:00 in Pacific time so the input will be Nov 1 at 06:00.
Returned will be Oct 1 at 06:59:59, which represents Oct 31 23:59:59 in Pacific time 'timezone'.
Arity 1: Adjust date
from and to UTC timezone.
Arity 2: Adjust date
from and to the supplied timezone
.
Arity 3: Adjust date
from from-tz
and return a new date represented in to-tz
.
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected end of the month of the local date in 'timezone'. Note: Will convert 'date' to local time in 'timezone' before calculating start of month, input should be in UTC. E.g. 'date' represents Oct 31 at 23:00 in Pacific time so the input will be Nov 1 at 06:00. Returned will be Oct 1 at 06:59:59, which represents Oct 31 23:59:59 in Pacific time 'timezone'. Arity 1: Adjust `date` from and to UTC timezone. Arity 2: Adjust `date` from and to the supplied `timezone`. Arity 3: Adjust `date` from `from-tz` and return a new date represented in `to-tz`.
(from-map params)
Returns a date given a map with keys and values representing a date time. Considers the following keys: #{:year :month :day :hour :minute :second :millisecond} with corresponding number values when creating the date.
Returns a date given a map with keys and values representing a date time. Considers the following keys: #{:year :month :day :hour :minute :second :millisecond} with corresponding number values when creating the date.
(from-tz-date & args__2042__auto__)
Compatibility alias for tz-uncorrected
Compatibility alias for tz-uncorrected
(from-tz-date-time & args__2042__auto__)
Compatibility alias for tz-uncorrected
Compatibility alias for tz-uncorrected
(from-unix-time-millis millis)
Return a date given the supplied number of millseconds millis
since the UNIX time.
Return a date given the supplied number of millseconds `millis` since the UNIX time.
(from-unix-time-secs secs)
Return a date given the supplied number of seconds millis
since the UNIX time.
Return a date given the supplied number of seconds `millis` since the UNIX time.
(in unit p)
Return the interval or period p
in unit
specified by a keyword:
#{:years :months :days :weeks :hours :minutes :seconds :millis}
Return the interval or period `p` in `unit` specified by a keyword: #{:years :months :days :weeks :hours :minutes :seconds :millis}
(in-days p)
Return the interval or period in days.
Return the interval or period in days.
(in-months p)
Return the interval or period in months.
Return the interval or period in months.
(interval from to)
Returns an interval representing the span between the two given dates. Note that intervals are closed on the left and open on the right.
'from' and 'to' are date instances of any type where 'from' is before 'to'.
Returns an interval representing the span between the two given dates. Note that intervals are closed on the left and open on the right. 'from' and 'to' are date instances of any type where 'from' is before 'to'.
(max date & more)
Returns the largest date, i.e. the latest in time.
Returns the largest date, i.e. the latest in time.
(min date & more)
Returns the smallest date, i.e. the earliest in time.
Returns the smallest date, i.e. the earliest in time.
(minus period)
(minus date period)
Transforms a given date and returns a new java.util.Date moved backwards by the given Period(s). Arity 1 version: moved backwards from System/currentTimeMillis.
'date' is a date instance as per 'toolbelt.date/transform'.
Transforms a given date and returns a new java.util.Date moved backwards by the given Period(s). Arity 1 version: moved backwards from System/currentTimeMillis. 'date' is a date instance as per 'toolbelt.date/transform'.
(month date)
Return the month component of the given date.
'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
Return the month component of the given date. 'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
(months n)
Given a number, returns a Period representing that many months.
Given a number, returns a Period representing that many months.
(overlap i1 i2)
Returns an interval representing the overlap between the two supplied intervals.
Returns an interval representing the overlap between the two supplied intervals.
(period &
{:keys [years months days weeks hours minutes seconds millis]
:as keyvals})
Given some keys with values, returns a Period that represents that amount of time.
E.g. (period :months 2 :days 1) returns a Period representing a time period of 2 months and 2 days.
Possible keys are: #{:years :months :days :weeks :hours :minutes :seconds :millis}
Given some keys with values, returns a Period that represents that amount of time. E.g. (period :months 2 :days 1) returns a Period representing a time period of 2 months and 2 days. Possible keys are: #{:years :months :days :weeks :hours :minutes :seconds :millis}
(plus period)
(plus date period)
Transforms a given date and returns a new java.util.Date moved forwards by the given Period(s). Arity 1 version: moved forwards from System/currentTimeMillis.
'date' is a date instance as per 'toolbelt.date/transform'.
Transforms a given date and returns a new java.util.Date moved forwards by the given Period(s). Arity 1 version: moved forwards from System/currentTimeMillis. 'date' is a date instance as per 'toolbelt.date/transform'.
(short-date & args__2042__auto__)
Compatibility alias for short
Compatibility alias for short
(short-date-time & args__2042__auto__)
Compatibility alias for short
Compatibility alias for short
(start-of-day-local date)
(start-of-day-local date tz)
Given a date
in local time UTC, returns a new date representing the time 00:00:00 in timezone 'tz'
of the same day.
Arity 1: Adjust date
to UTC (will be unchanged when input date is in UTC).
Arity 2: Adjust date
with respect to timezone tz
.
'date' is a date instance as per 'toolbelt.date/transform'.
Given a `date` in local time UTC, returns a new date representing the time 00:00:00 in timezone 'tz' of the same day. Arity 1: Adjust `date` to UTC (will be unchanged when input date is in UTC). Arity 2: Adjust `date` with respect to timezone `tz`. 'date' is a date instance as per 'toolbelt.date/transform'.
(start-of-day-utc date)
(start-of-day-utc date timezone)
(start-of-day-utc date from-tz to-tz)
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected start of day of the local date in 'timezone'.
Note: Will convert 'date' to local time in 'timezone' before calculating start of day, input should be in UTC. E.g. 'date' represents Oct 12 at 23:00 in Pacific time so the input will be Oct 13 at 06:00. Returned will be Oct 12 at 07:00, which represents start of day of Oct 12 in Pacific time 'timezone'.
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected start of day of the local date in 'timezone'. Note: Will convert 'date' to local time in 'timezone' before calculating start of day, input should be in UTC. E.g. 'date' represents Oct 12 at 23:00 in Pacific time so the input will be Oct 13 at 06:00. Returned will be Oct 12 at 07:00, which represents start of day of Oct 12 in Pacific time 'timezone'.
(start-of-month-local date)
(start-of-month-local date tz)
Given a date
in local time UTC, returns a new date representing the 1st of the month at 00:00:00 in timezone 'tz'
of the same month.
Arity 1: Adjust date
to UTC (will be unchanged when input date is in UTC).
Arity 2: Adjust date
with respect to timezone tz
.
'date' is a date instance as per 'toolbelt.date/transform'.
Given a `date` in local time UTC, returns a new date representing the 1st of the month at 00:00:00 in timezone 'tz' of the same month. Arity 1: Adjust `date` to UTC (will be unchanged when input date is in UTC). Arity 2: Adjust `date` with respect to timezone `tz`. 'date' is a date instance as per 'toolbelt.date/transform'.
(start-of-month-utc date)
(start-of-month-utc date timezone)
(start-of-month-utc date from-tz to-tz)
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected start of the month of the local date in 'timezone'.
Note: Will convert 'date' to local time in 'timezone' before calculating start of month, input should be in UTC. E.g. 'date' represents Oct 31 at 23:00 in Pacific time so the input will be Nov 1 at 06:00. Returned will be Oct 1 at 07:00, which represents start of Oct in Pacific time 'timezone'.
Takes a 'date' in UTC time representing a time in 'timezone', and returns the UTC corrected start of the month of the local date in 'timezone'. Note: Will convert 'date' to local time in 'timezone' before calculating start of month, input should be in UTC. E.g. 'date' represents Oct 31 at 23:00 in Pacific time so the input will be Nov 1 at 06:00. Returned will be Oct 1 at 07:00, which represents start of Oct in Pacific time 'timezone'.
(to-map date)
Returns a map with keys and values representing the supplied date
. The returned map includes
the following keys: #{:year :month :day :hour :minute :second :millisecond :day-of-week :week-of-year}
with corresponding number values.
Returns a map with keys and values representing the supplied `date`. The returned map includes the following keys: #{:year :month :day :hour :minute :second :millisecond :day-of-week :week-of-year} with corresponding number values.
(to-unix-time dt)
(to-unix-time dt unit)
Return the number of seconds after the Unix time
Arity 1: returns the number of milliseconds after Unix time.
Arity 2: returns the time in unit
after Unix time: #{:millis :seconds}
Return the number of seconds after the Unix time Arity 1: returns the number of milliseconds after Unix time. Arity 2: returns the time in `unit` after Unix time: #{:millis :seconds}
(to-utc-corrected-date & args__2042__auto__)
Compatibility alias for tz-corrected
Compatibility alias for tz-corrected
(to-utc-corrected-date-time & args__2042__auto__)
Compatibility alias for tz-corrected
Compatibility alias for tz-corrected
(transform d f & args)
'Transforms' a date where 'd' is a date of any type (timestamp, org.joda.DateTime, java.util.Date. etc), and returns a java.util.Date, after applying a transformation function 'f', which is a function that takes a date/time instance and any supplied args and returns a date.
'Transforms' a date where 'd' is a date of any type (timestamp, org.joda.DateTime, java.util.Date. etc), and returns a java.util.Date, after applying a transformation function 'f', which is a function that takes a date/time instance and any supplied args and returns a date.
(tz-corrected inst tz)
Produce the UTC instant in time relative to timezone tz
.
Produce the UTC instant in time relative to timezone `tz`.
(tz-uncorrected inst tz)
Produce the absolute UTC instant from timezone tz
.
Produce the absolute UTC instant from timezone `tz`.
(within? interval test)
(within? start end test)
With 2 arguments: Returns true if the given Interval contains the given date. Note that if the date is exactly equal to the end of the interval, this function returns false. With 3 arguments: Returns true if the start date is equal to or before and the end date is equal to or after the test ReadablePartial.
With 2 arguments: Returns true if the given Interval contains the given date. Note that if the date is exactly equal to the end of the interval, this function returns false. With 3 arguments: Returns true if the start date is equal to or before and the end date is equal to or after the test ReadablePartial.
(year date)
Return the year component of the given date.
'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
Return the year component of the given date. 'date' is a date instance of any type (e.g. timestamp, java-date, date/time etc.)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close