 
 (extend-type Year
   ITimeArithmetic
-  (+ [t x] (if (number? x) (.plusYears t x) (.plus t x)))
-  (- [t x] (if (number? x) (.minusYears t x) (.minus t x)))
+  (+ [t x] (.plus t x))
+  (- [t x] (.minus t x))
   (inc [t] (.plusYears t 1))
   (dec [t] (.minusYears t 1))
   (maximum [x y] (if (neg? (compare x y)) y x))

    ([from to step] (cond->> (iterate #(.plusDays % step) from)
                      to (take-while #(< % to))))))

(extend-type LocalDateTime
  ITimeArithmetic
  (+ [t x] (.plus t x))

(extend-protocol IDivisible
  String
  (/ [s d] (/ (parse s) d)))

(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))

(defn min [arg & args]
  (reduce #(minimum %1 %2) arg args))

(extend-type Instant
  ITimeArithmetic
