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>
### 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: ```clojure => (to-long (date-time 1998 4 25)) 893462400000 => (from-long 893462400000) #<19980425T000000> ```
(from-date date)
Returns a DateTime instance in the UTC time zone corresponding to the given js Date object.
Returns a DateTime instance in the UTC time zone corresponding to the given js 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)
Returns DateTime instance from string using formatters in cljs-time.format, returning first which parses
Returns DateTime instance from string using formatters in cljs-time.format, returning first which parses
(to-date-time obj)
Convert obj
to a goog.date.DateTime instance.
Convert `obj` to a goog.date.DateTime instance.
(to-date obj)
Convert obj
to a JavaScript Date instance.
Convert `obj` to a JavaScript Date instance.
(to-epoch obj)
Convert obj
to Unix epoch.
Convert `obj` to Unix epoch.
(to-local-date obj)
Convert obj
to a goog.date.Date instance
Convert `obj` to a goog.date.Date instance
(to-local-date-time obj)
Convert obj
to a goog.date.DateTime instance
Convert `obj` to a goog.date.DateTime 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-string obj)
Returns a string representation of obj in UTC time-zone using "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" date-time representation.
Returns a string representation of obj in UTC time-zone using "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" date-time representation.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close