dm3/clojure.java-time

Make LocalDate Ordered too

valerauko opened this issue · 2 comments

While local-time can be compared using after?, local-date doesn't have the required extension at this point. It'd be more intuitive (and useful) if local-date could be similarly compared.

I can put up a PR if you're okay with that.

dm3 commented

Agree. Would welcome a PR!

Hmm actually now that I've dug into the source code it seems that LocalDate is already Ordered? There are tests to cover it handling before? and after? too. The issue I encountered was rather due to trying to compare it against java.util.Dates.

user=> (satisfies? java-time.core/Ordered (java-time/local-date))
true

Sorry about that.