Utilites to coerce Joda DateTime instances to and from various other types. For example, to convert a Joda DateTime to and from a Java long:
=> (to-long (date-time 1998 4 25)) 893462400000
=> (from-long 893462400000) #<DateTime 1998-04-25T00:00:00.000Z>
Utilites to coerce Joda DateTime instances to and from various other types. For example, to convert a Joda DateTime to and from a Java long: => (to-long (date-time 1998 4 25)) 893462400000 => (from-long 893462400000) #<DateTime 1998-04-25T00:00:00.000Z>
(from-date date)
Returns a DateTime instance in the UTC time zone corresponding to the given Java Date object.
Returns a DateTime instance in the UTC time zone corresponding to the given Java Date object.
(from-long millis)
Returns a DateTime instance in the UTC time zone corresponding to the given number of milliseconds after the Unix epoch.
Returns a DateTime instance in the UTC time zone corresponding to the given number of milliseconds after the Unix epoch.
(from-string s)
return DateTime instance from string using formatters in clj-time.format, returning first which parses
return DateTime instance from string using formatters in clj-time.format, returning first which parses
(to-date dt)
Returns a Java Date object corresponding to the given DateTime instance.
Returns a Java Date object corresponding to the given DateTime instance.
(to-long dt)
Returns the number of milliseconds that the given DateTime is after Unix epoch.
Returns the number of milliseconds that the given DateTime is after Unix epoch.
(to-string dt)
Returns a string representation of date in UTC time-zone using (ISODateTimeFormat/dateTime) date-time representation.
Returns a string representation of date in UTC time-zone using (ISODateTimeFormat/dateTime) date-time representation.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close