Check if an expiration has passed:
(let [expiry (t/instant "2018-01-01T00:00")]
(t/> (t/now)
expiry))
These examples don’t have a home yet.
Check if an expiration has passed:
(let [expiry (t/instant "2018-01-01T00:00")]
(t/> (t/now)
expiry))
Return a sequence of dates between two given dates a with a specified jump between each.
For instance, to get a sequence of the first day of each month in a given year:
(def intvl (t/bounds (t/year)))
(t/range (t/beginning intvl)
(t/end intvl)
(t/new-period 1 :months))
Get the time difference between two instances:
(t/between (t/now) (t/epoch))
Not sure on input format? parse
will do the work for you.
(t/parse "2 pm")
(t/parse "14")
(t/parse "14:00")
(t/parse "2018-01-01")
(t/parse "2018-01-01T00:00")
(t/parse "2018-01-01T00:00:00")
(t/parse "2018-01-01T00:00:00+01:00")
(t/parse "2018-01-01T00:00:00+01:00[Europe/London]")
(t/parse "2019")
(t/parse "2000-01")
Can you improve this documentation? These fine people already did:
Johanna Antonelli & Malcolm SparksEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close