diff --git a/CHANGELOG b/CHANGELOG index a36cb2e..220301a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ # 0.7.0 -tick.interval.bounds function is now consistent for years, year-months and dates in setting the `end` to be inclusive +* tick.interval.bounds function is now consistent for years, year-months and dates in setting the `end` to be inclusive +* Strings are no longer accepted as beginning/end when constructing an interval +* Strings are no longer accepted as arguments to clock # 0.6.1 diff --git a/docs/intervals.adoc b/docs/intervals.adoc index fd0d249..204bdc7 100644 --- a/docs/intervals.adoc +++ b/docs/intervals.adoc @@ -24,8 +24,8 @@ Here we use a literal map syntax to construct an interval representing the last [source.code,clojure] ---- -{:tick/beginning "2018-12-31T23:55:00Z" - :tick/end "2019-01-01T00:00:00Z"} +{:tick/beginning (t/instant "2018-12-31T23:55:00Z") + :tick/end (t/instant "2019-01-01T00:00:00Z"}) ---- ==== diff --git a/src/tick/core.cljc b/src/tick/core.cljc index 4c0a483..be7fcb7 100644 --- a/src/tick/core.cljc +++ b/src/tick/core.cljc @@ -718,10 +718,7 @@ (clock [clk] clk) ZoneId - (clock [z] (cljc.java-time.clock/system z)) - - #?(:clj String :cljs string) - (clock [s] (p/clock (p/parse s)))) + (clock [z] (cljc.java-time.clock/system z))) (defn tick-resolution ([clk] @@ -923,10 +920,6 @@ ([from to step] (cond->> (iterate #(cljc.java-time.year/plus % step) from) to (take-while #(p/< % to)))))) -(extend-protocol p/IDivisible - #?(:clj String :cljs string) - (divide [s d] (p/divide (p/parse s) d))) - (extend-protocol p/IDivisibleDuration #?(:clj Long :cljs number) (divide-duration [n duration] (cljc.java-time.duration/divided-by duration n)) @@ -965,8 +958,6 @@ (between [v1 v2] (cljc.java-time.duration/between v1 (p/offset-date-time v2))) #?@(:clj [Temporal (between [v1 v2] (cljc.java-time.duration/between v1 v2))]) - #?(:clj String :cljs string) - (between [v1 v2] (p/between (p/parse v1) (p/parse v2))) #?(:clj Date :cljs js/Date) (between [x y] (p/between (p/instant x) (p/instant y))))