Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Date-manipulation/Clojure/date-manipulation.clj
Normal file
11
Task/Date-manipulation/Clojure/date-manipulation.clj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(import java.util.Date
|
||||
java.text.SimpleDateFormat)
|
||||
|
||||
(defn time+12 [s]
|
||||
(let [sdf (SimpleDateFormat. "MMMM d yyyy h:mma zzz")]
|
||||
(-> (.parse sdf s)
|
||||
(.getTime ,)
|
||||
(+ , 43200000)
|
||||
long
|
||||
(Date. ,)
|
||||
(->> , (.format sdf ,)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue