Created
April 2, 2015 21:09
-
-
Save pgaertig/fdc768447c044429a34a to your computer and use it in GitHub Desktop.
Time format conversion in ClojureScript with MomentJS
This file contains hidden or 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
(enable-console-print!) | |
(defn moment [arg] (.moment js/window arg)) | |
(defn json-date-short [str] | |
(if str | |
(-> (moment str) | |
(.format "MM-DD HH:mm")) | |
"-") | |
) | |
(println (json-date-short "2015-03-01T15:36:34Z") ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment