(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)
(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.
(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.
Interface for various date time functions
Interface for various date time functions
(minute this)
(after? this that)
(hour this)
(day this)
(second this)
(plus- this period)
(day-of-week this)
(month this)
(before? this that)
(year this)
(minus- this period)
(milli this)
(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.
(end in)
Returns the end DateTime of an Interval.
Returns the end DateTime of an Interval.
(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.
(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
(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)
(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.
(in-days in)
Returns the number of standard days in the given Interval.
Returns the number of standard days in the given Interval.
(in-hours in)
Returns the number of standard hours in the given Interval.
Returns the number of standard hours in the given Interval.
(in-millis in)
Returns the number of milliseconds in the given Interval.
Returns the number of milliseconds in the given Interval.
(in-minutes in)
Returns the number of standard minutes in the given Interval.
Returns the number of standard minutes in the given Interval.
(in-months in)
Returns the number of standard months in the given Interval.
Returns the number of standard months in the given Interval.
(in-seconds in)
Returns the number of standard seconds in the given Interval.
Returns the number of standard seconds in the given Interval.
(in-weeks in)
Returns the number of standard weeks in the given Interval.
Returns the number of standard weeks in the given Interval.
(in-years in)
Returns the number of standard years in the given Interval.
Returns the number of standard years in the given Interval.
(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.
(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.
(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).
(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.
(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.
(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.
(number-of-days-in-the-month dt)
(number-of-days-in-the-month year month)
(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.
(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).
(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.
(start in)
Returns the start DateTime of an Interval.
Returns the start DateTime of an Interval.
(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'.
(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.
(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.
(today-at hours minutes)
(today-at hours minutes seconds)
(today-at hours minutes seconds millis)
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close