Liking cljdoc? Tell your friends :D

clj-time.coerce

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>
raw docstring

from-dateclj

(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.
raw docstring

from-longclj

(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.
raw docstring

from-stringclj

(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
raw docstring

to-dateclj

(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.
raw docstring

to-longclj

(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.
raw docstring

to-stringclj

(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. 
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close