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>
tagged literal support if loader does not find "data_readers.clj"
tagged literal support if loader does not find "data_readers.clj"
(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-epoch epoch)
Returns a DateTime instance in the UTC time zone from given Unix epoch.
Returns a DateTime instance in the UTC time zone from given Unix epoch.
(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-sql-date sql-date)
Returns a DateTime instance in the UTC time zone corresponding to the given java.sql.Date object.
Returns a DateTime instance in the UTC time zone corresponding to the given java.sql.Date object.
(from-sql-time sql-time)
Returns a DateTime instance in the UTC time zone corresponding to the given java.sql.Timestamp object.
Returns a DateTime instance in the UTC time zone corresponding to the given java.sql.Timestamp object.
(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-time obj)
Convert obj
to a Joda DateTime instance.
Convert `obj` to a Joda DateTime instance.
(in-time-zone obj tz)
Convert obj
into tz
, return org.joda.time.LocalDate instance.
Convert `obj` into `tz`, return org.joda.time.LocalDate instance.
(to-date obj)
Convert obj
to a Java Date instance.
Convert `obj` to a Java Date instance.
(to-edn obj)
Convert obj
to a string representation readable by clojure.edn/read.
Convert `obj` to a string representation readable by clojure.edn/read.
(to-epoch obj)
Convert obj
to Unix epoch.
Convert `obj` to Unix epoch.
(to-local-date obj)
Convert obj
to a org.joda.time.LocalDate instance
Convert `obj` to a org.joda.time.LocalDate instance
(to-local-date-time obj)
Convert obj
to a org.joda.time.LocalDateTime instance
Convert `obj` to a org.joda.time.LocalDateTime instance
(to-long obj)
Convert obj
to the number of milliseconds after the Unix epoch.
Convert `obj` to the number of milliseconds after the Unix epoch.
(to-sql-date obj)
Convert obj
to a java.sql.Date instance.
Convert `obj` to a java.sql.Date instance.
(to-sql-time obj)
Convert obj
to a java.sql.Timestamp instance.
Convert `obj` to a java.sql.Timestamp instance.
(to-string obj)
Returns a string representation of obj in UTC time-zone using (ISODateTimeFormat/dateTime) date-time representation.
Returns a string representation of obj in UTC time-zone using (ISODateTimeFormat/dateTime) date-time representation.
(to-timestamp obj)
Convert obj
to a Java SQL Timestamp instance.
Convert `obj` to a Java SQL Timestamp instance.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close