(parse-interval value)
Takes a string containing a date or partial date and returns a corresponding interval
2015 => (t/interval (t/date-time 2015 1 1) (t/date-time 2016 1 1)) 2015-03 => (t/interval (t/date-time 2015 3 1) (t/date-time 2015 4 1)) 2015-03-02 => (t/interval (t/date-time 2015 3 2) (t/date-time 2015 3 3))
Takes a string containing a date or partial date and returns a corresponding interval 2015 => (t/interval (t/date-time 2015 1 1) (t/date-time 2016 1 1)) 2015-03 => (t/interval (t/date-time 2015 3 1) (t/date-time 2015 4 1)) 2015-03-02 => (t/interval (t/date-time 2015 3 2) (t/date-time 2015 3 3))
(parse-range value)
Accepts a date range in a variety of formats and returns a tuple containing the start and end dates, like [start end].
2015 => [#local-date 2015-01-01 #local-date 2015-12-31] 2015-03 => [#local-date 2015-03-01 #local-date 2015-03-31] 2015-03-02 => [#local-date 2015-03-02 #local-date 2015-03-02] #local-date 2015-03-03 => [#local-date 2015-03-02 #local-date 2015-03-02]
Accepts a date range in a variety of formats and returns a tuple containing the start and end dates, like [start end]. 2015 => [#local-date 2015-01-01 #local-date 2015-12-31] 2015-03 => [#local-date 2015-03-01 #local-date 2015-03-31] 2015-03-02 => [#local-date 2015-03-02 #local-date 2015-03-02] #local-date 2015-03-03 => [#local-date 2015-03-02 #local-date 2015-03-02]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close