supports terms.
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
;; 2017-09-19T07:00:00.000Z
|
||||
(def is-8601 #"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$")
|
||||
|
||||
(def is-year-month-day #"^\d{4}-\d{2}-\d{2}$")
|
||||
|
||||
|
||||
(defn dates->date-times [x]
|
||||
(walk/postwalk
|
||||
@@ -42,6 +44,10 @@
|
||||
(re-matches is-8601 node))
|
||||
(format/parse (format/formatters :date-time) node)
|
||||
|
||||
(and (string? node)
|
||||
(re-matches is-year-month-day node))
|
||||
(time/from-default-time-zone (format/parse (format/formatters :year-month-day) node))
|
||||
|
||||
(instance? js/Date node)
|
||||
(time/to-default-time-zone (c/from-date node))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user