dm3 / clojure.java-time

Java 8 Date-Time API for Clojure
MIT License
461 stars 45 forks source link

t/> comparison and t/plus arithmetic support for java.sql.Timestamp #106

Open devurandom opened 7 months ago

devurandom commented 7 months ago

Would it be possible for java-time.api/> (and similar) to support java.sql.Timestamp?

(require '[java-time.api :as t])

(t/> (t/instant->sql-timestamp (t/instant))
     (t/instant))

throws: No implementation of method: :single-after? of protocol: #'java-time.core/Ordered found for class: java.sql.Timestamp

devurandom commented 6 months ago

Similar for java-time.api/plus and java.sql.Timestamp, which throws java.lang.IllegalArgumentException: No implementation of method: :seq-plus of protocol: #'java-time.core/Plusable found for class: java.sql.Timestamp.