Skip to content

Commit

Permalink
CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
henryw374 committed Aug 24, 2023
1 parent 0869723 commit 4fe4485
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/intervals.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
----
====
Expand Down
11 changes: 1 addition & 10 deletions src/tick/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))))

Expand Down

0 comments on commit 4fe4485

Please sign in to comment.