Created
May 4, 2015 21:19
-
-
Save pgaertig/e20aeef4d3ee4d910893 to your computer and use it in GitHub Desktop.
MomentJS with ClojureScript
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
(ns kpapi.utils) | |
(enable-console-print!) | |
(defn moment [arg] (.moment js/window arg)) | |
(defn fmt-date-short [str] | |
(if str (-> (moment str) (.format "MM-DD HH:mm")) "-")) | |
(defn fmt-date-time [str] | |
(if str (-> (moment str) (.format "YYYY-MM-DD HH:mm")) "-")) | |
(defn fmt-date-words [str] | |
(if str (-> (moment str) (.calendar)) "-")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment