dm3 / clojure.java-time

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

Various properties gone missing in 0.3.3 #77

Closed deepxg closed 2 years ago

deepxg commented 2 years ago

This might be me abusing the API, in which case my apologies, but upgrading from 0.3.2 to 0.3.3 has lost various useful properties and keys I was relying on. For example the property :minute-of-day no longer exists, and as-map not longer returns :instant-seconds. If there are more canonical ways to retrieve these I'd appreciate a pointer!

dm3 commented 2 years ago

Thanks for the report! This is caused by #51. There were no tests checking whether all properties present before the PR remained available afterwards. This is definitely a bug and not something intentional. Please stay on 0.3.2.

Would also be helpful if you have a list of all the properties that you've relied on. There are two options now:

  1. Revert the PR - should be minimal impact as the main goal of the PR - decreasing load time - didn't realize.
  2. Add all the properties to the static list manually

Given that I'm not actively working with Clojure anymore, I'm leaning towards 1.

unmonoqueteclea commented 2 years ago

We also lost two properties:

:aligned-week-of-year and :minute-of-hour

They weren't tested in https://github.com/dm3/clojure.java-time/blob/78cecf35cf959ae83879f655ca8afcde78ce7b92/test/java_time_test.clj#L769

orestis commented 2 years ago

There doesn't seem to be a 0.3.4 version in clojars? I see a changelog entry that fixes this though.

frenchy64 commented 2 years ago

Fixed by https://github.com/dm3/clojure.java-time/commit/8b1ed78c4c226e12f9a30d2bc50f9c721ee22bb3

Will be in the next release.

brunchboy commented 1 year ago

Any idea when the next release might be out? I came here to open an issue about this because I was running into exceptions trying to get the :minute-of-hour from a ZonedDateTime, but it looks like this will be fixed in the next release already if I am reading this right.

frenchy64 commented 1 year ago

@brunchboy no sorry, waiting on https://github.com/dm3/clojure.java-time/issues/84#issuecomment-1157664090

brunchboy commented 1 year ago

Ah, that makes sense! Fingers crossed you will get access soon; in the mean time, I will do things the old, Java interop way.