Return to Snippet

Revision: 54161
at December 13, 2011 06:54 by ef


Initial Code
(defn get-current-iso-8601-date
  "Returns current ISO 8601 compliant date."
  [] (.format (SimpleDateFormat. "yyyy-MM-dd'T'HH:mm:ssZ") (.getTime (Calendar/getInstance))))

Initial URL


Initial Description
Return string representing current date in ISO 8601 format, e.g. "2011-12-12T20:50:22+0100".
java.util.Calendar and java.text.SimpleDateFormat have to be imported first.
NOTICE: Use this instead: http://snipplr.com/view/62060/clojure-iso-8601-current-date-with-cljtime/

Initial Title
Clojure ISO 8601 current date

Initial Tags
date

Initial Language
Clojure