Created
February 24, 2015 13:10
-
-
Save jcf/e7fcabdbe885e8964bba to your computer and use it in GitHub Desktop.
Parse stringified Javascript Date with Joda and clj-time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clj-time.format :as f]) | |
(def javascript-date-string-formatter | |
(f/formatter "EEE MMM dd YYYY HH:mm:ss zZ '('z')'")) | |
(f/parse javascript-date-string-formatter "Tue Feb 24 2015 13:09:43 GMT+0000 (GMT)") | |
;; => #<DateTime 2015-02-24T13:09:43.000Z> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment