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:

Initial Title
Clojure ISO 8601 current date

Initial Tags

Initial Language