Random utilities, date and time functions.
Random utilities, date and time functions.
(days-ago n)
Returns a time of days ago from now.
Returns a time of days ago from now.
(parse-duration d)
(parse-duration d default-unit)
(parse-duration d default-unit & pairs)
Parses time duration expressed as value and unit. For a single argument being a
single value it is treated as minutes. For a single value being a collection the
function is applied to consecutive values. For the given d
and default-unit
the
value of d
is parsed as a long number and the unit is converted into a keyword
and should be one of the: :day
, :hour
, :minute
, :second
, :millisecond
,
:microsecond
or :nanosecond
(including their corresponding plural forms). When
multiple arguments are given they are parsed in pairs and added to create a single
duration.
Parses time duration expressed as value and unit. For a single argument being a single value it is treated as minutes. For a single value being a collection the function is applied to consecutive values. For the given `d` and `default-unit` the value of `d` is parsed as a long number and the unit is converted into a keyword and should be one of the: `:day`, `:hour`, `:minute`, `:second`, `:millisecond`, `:microsecond` or `:nanosecond` (including their corresponding plural forms). When multiple arguments are given they are parsed in pairs and added to create a single duration.
(try-times & body)
Executes body. If an exception is thrown, will retry. At most n retries are done. If still some exception is thrown it is bubbled upwards in the call chain.
Executes body. If an exception is thrown, will retry. At most n retries are done. If still some exception is thrown it is bubbled upwards in the call chain.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close