cljs-time.coerce

### Utilites to coerce goog.date DateTime instances to and from
various other types.

For example, to convert a goog.date DateTime to and from a js number:

  => (to-long (date-time 1998 4 25))
  893462400000

  => (from-long 893462400000)
  #<19980425T000000>

from-date

(from-date date)
Returns a DateTime instance in the UTC time zone corresponding to the given
js Date object.

from-long

(from-long millis)
Returns a DateTime instance in the UTC time zone corresponding to the given
number of milliseconds after the Unix epoch.

from-string

(from-string s)
Returns DateTime instance from string using formatters in cljs-time.format,
returning first which parses

ICoerce

protocol

members

to-date-time

(to-date-time obj)
Convert `obj` to a goog.date.DateTime instance.

to-date

(to-date obj)
Convert `obj` to a JavaScript Date instance.

to-epoch

(to-epoch obj)
Convert `obj` to Unix epoch.

to-local-date

(to-local-date obj)
Convert `obj` to a goog.date.Date instance

to-local-date-time

(to-local-date-time obj)
Convert `obj` to a goog.date.DateTime instance

to-long

(to-long obj)
Convert `obj` to the number of milliseconds after the Unix epoch.

to-string

(to-string obj)
Returns a string representation of obj in UTC time-zone
using "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" date-time representation.