Skip to content

Instantly share code, notes, and snippets.

@bhenry
Created October 2, 2010 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhenry/0339a85497a2076275e1 to your computer and use it in GitHub Desktop.
Save bhenry/0339a85497a2076275e1 to your computer and use it in GitHub Desktop.
(defn display-date [d]
"takes a db date and turns it into a format easily entered/read"
(str-join " " [(str-join "-" (map pad-to-2
[(+ 1900 (.getYear d))
(+ 1 (.getMonth d))
(.getDate d)]))
(str-join ":" (map pad-to-2
[(.getHours d)
(.getMinutes d)
(.getSeconds d)]))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment