Skip to content
Snippets Groups Projects
Commit eaf6a38a authored by Allen Gilliland's avatar Allen Gilliland
Browse files

add a new function for `(now-with-format)` which accepts a single argument...

add a new function for `(now-with-format)` which accepts a single argument which is a date format as a string and formats the current time to the given format.  this makes it easy to get the current time in any format the caller wants.
parent 086ca36b
Branches
Tags
No related merge requests found
......@@ -108,6 +108,11 @@
[]
(time/unparse (time/formatters :date-time) (coerce/from-long (System/currentTimeMillis))))
(defn now-with-format
"format the current time using a custom format."
[format]
(time/unparse (time/formatter format) (coerce/from-long (System/currentTimeMillis))))
(defn jdbc-clob->str
"Convert a `JdbcClob` to a `String`."
(^String
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment