Skip to content

Instantly share code, notes, and snippets.

@jcf
Created February 24, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcf/e7fcabdbe885e8964bba to your computer and use it in GitHub Desktop.
Save jcf/e7fcabdbe885e8964bba to your computer and use it in GitHub Desktop.
Parse stringified Javascript Date with Joda and clj-time
(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