   (> [x y] (.isAfter x y))
   (>= [x y] (not (.isBefore x y))))
 
-(defprotocol ITimeArithmetic
-  (+ [_ _] "Add time")
-  (- [_ _] "Subtract time")
-  (inc [_] "Increment time")
-  (dec [_] "Decrement time")
-  (maximum [_ _] "Return maximum")
-  (minimum [_ _] "Return minimum"))
-
 (defn max [arg & args]
   (reduce #(maximum %1 %2) arg args))
 

  LocalDate
  (at [date t] (.atTime date (time t))))

(defn midnight [^LocalDate date]
  (at date (LocalTime/MIDNIGHT)))

(defn noon [^LocalDate date]
  (at date (LocalTime/NOON)))

(defn midnight? [^LocalDateTime t]
  (.isZero (Duration/between t (beginning (date t)))))

(defprotocol IAtZone
  (at-zone [t zone] "Put time at zone")

  (if *clock*
    (LocalDate/now *clock*)
    (LocalDate/now)))

(defprotocol ITimeArithmetic
  (+ [_ _] "Add time")
  (- [_ _] "Subtract time")
  (inc [_] "Increment time")
  (dec [_] "Decrement time")
  (maximum [_ _] "Return maximum")
  (minimum [_ _] "Return minimum"))

(defn tomorrow []
  (+ (today) 1))

(defn yesterday []
  (- (today) 1))

(defprotocol ITimeAt
  (on [_ _] "Set time be ON a date")
  (at [_ _] "Set date to be AT a time")  )

(defn midnight [^LocalDate date]
  (at date (LocalTime/MIDNIGHT)))

(defn noon [^LocalDate date]
  (at date (LocalTime/NOON)))

(defn epoch []
  (java.time.Instant/EPOCH))
