parse-timestamp
is a function of two arguments. The string representation of a timestamp is the second one. The first one is for passing in a function that takes a bunch of arguments and constructs an object representing an instant. The arguments to this new-instant
function are described in the docstring of parse-timestamp
-- see (doc clojure.instant/parse-timestamp)
for details.
Normally you don't need to call parse-timestamp
directly, as clojure.instant
exports a bunch of functions for reading in timestamps:
(clojure.instant/read-instant-date "2014-04-23T10:13Z")
;= #inst "2014-04-23T10:13:00.000-00:00"
read-instant-calendar
and read-instant-timestamp
are the other two functions of this type. They're all built using parse-timestamp
and have docstrings documenting their contracts.