(destruct dt)Returns a vector, the parts of the time, that can be applied to the date-time constructor
Returns a vector, the parts of the time, that can be applied to the date-time constructor
(duration dt-a dt-b)Returns the duration between two datetimes
Returns the duration between two datetimes
(duration->millis d)(duration-millis d)(duration< d p)(duration> d p)True if this duration is longer than Period p
True if this duration is longer than Period p
(from-epoch-millis millis)Given a number of millis since the epoch, return a datetime
Given a number of millis since the epoch, return a datetime
(from-now period)Takes a period, returns the interval starting from now
Takes a period, returns the interval starting from now
(interval->duration i)(interval->millis interval)Takes a joda interval, returns a number of millis in the interval
Takes a joda interval, returns a number of millis in the interval
(java-now)Returns a java.util.Time for now
Returns a java.util.Time for now
(max dt-a dt-b)Returns the greater of the two datetimes
Returns the greater of the two datetimes
(maybe-interval dt-a dt-b)Returns an interval, or nil when dt-b is before dt-a. Use when the two datetimes could be created by different machines and clock skew, or bugs, or races
Returns an interval, or nil when dt-b is before dt-a. Use when the two datetimes could be created by different machines and clock skew, or bugs, or races
(parse s)(parse fmt s)Returns a DateTime instance (in the parsed timezone) time zone obtained by parsing the given string according to the given formatter. This function is a copy of clj-time.parse/parse, except that it uses WithOffsetParsed
Returns a DateTime instance (in the parsed timezone) time zone obtained by parsing the given string according to the given formatter. This function is a copy of clj-time.parse/parse, except that it uses WithOffsetParsed
(period->interval period)(period->millis p)(period->secs p)(period->str period)Takes a joda period, returns a human readable string
Takes a joda period, returns a human readable string
(pretty-day date)Given a DateTime, print 'today', 'yesterday', 'monday', 'last week' or 'may 25th'
Given a DateTime, print 'today', 'yesterday', 'monday', 'last week' or 'may 25th'
(round dt period)Truncate the datetime to the nearest period. period can be :year :month :date :hour :second
Truncate the datetime to the nearest period. period can be :year :month :date :hour :second
(to-epoch-millis dt)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |