Back
meets? (clj)
(source)function
(meets? x y)
Examples
tick
(ns tick.alpha.interval-test
(:require
[clojure.spec.alpha :as s]
[tick.core :as t]
[tick.protocols :as p]
[clojure.test
:refer [deftest is testing run-tests]
:refer-macros [deftest is testing run-tests]]
[tick.alpha.interval :as ti]
#?@(:cljs [[java.time :refer [Instant LocalDateTime LocalTime]]]))
#?(:clj
(:import [java.time LocalDateTime Instant LocalTime])))
;; TODO: more Interval testing
(deftest successive-intervals-meet
(doseq [x [(t/date) (t/year) (t/year-month)]]
(is (ti/meets? (t/end x) (t/beginning (t/inc x))))))