Created
January 11, 2018 12:11
-
-
Save crankyadmin/a3db5b5429dde419aff87a0875f259e1 to your computer and use it in GitHub Desktop.
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
(defn parse-second | |
"" | |
[time-string] | |
(str (time/second (time-coerce/from-string time-string)))) | |
(defn parse-minute | |
"" | |
[time-string] | |
(str (time/minute (time-coerce/from-string time-string)))) | |
(defn parse-hour | |
"Given time string => '2017-12-26T11:59:50.018+0000' will return 11" | |
[time-string] | |
(str (time/hour (time-coerce/from-string time-string)))) | |
(defn parse-day | |
"" | |
[time-string] | |
(str (time/day (time-coerce/from-string time-string)))) | |
(defn parse-month | |
"" | |
[time-string] | |
(str (time/month (time-coerce/from-string time-string)))) | |
(defn parse-year | |
"" | |
[time-string] | |
(str (time/year (time-coerce/from-string time-string)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment