All functions are located in the com.biffweb namespace.
(now)
Same as (java.util.Date.)Same as "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", for use with parse-date and format-date.(parse-date date & [format])
Parses date (a string) using java.text.SimpleDateFormat.
If format isn't provided, uses rfc3339.(format-date date & [format])
Formats date using java.text.SimpleDateFormat.
If format isn't provided, uses rfc3339.(crop-date date format)
Passes date through format-date and parse-date, in order to remove any
information not captured in the format.
For example:
(crop-date #inst "2022-03-27T09:13:34.182-00:00" "yyyy")
=> #inst "2022-01-01T08:00:00.000-00:00"(crop-day date)
Same as (crop-date "yyyy-MM-dd")(elapsed? t1 t2 x unit)
Returns true if t2 occurs at least x units after t1.
unit can be :seconds, :minutes, :hours, :days, or :weeks.(between-hours? t h1 h2)
Returns true if t is between the hours of h1 and h2 UTC.
For example:
(between-hours? #inst "2022-03-27T14:18:34.360-00:00" 14 16)
=> true(add-seconds date seconds)
Returns a new java.util.Date with the given number of seconds added.