oblac / jodd-util

Essential Java utilities.
https://util.jodd.org
BSD 2-Clause "Simplified" License
39 stars 9 forks source link

Update JulianDate API consistency and rounding #15

Closed cusher closed 1 year ago

cusher commented 1 year ago

Tests also done in a slightly more systematic way.

This has some breaking changes due to renaming methods and replacing constructors with static of methods. Not sure if it would be better to leave that alone (or keep and mark as deprecated instead), but it seemed like you had done the same in the branch already.

igr commented 1 year ago

Question @cusher: do you mind that JulianDate is part of the jodd-util?

If you think it makes sense, I may extract the class and add it to a separate repo instead?

cusher commented 1 year ago

@igr No, I don't mind. I'm just glad to have someone who is very responsive and cares about the library maintaining the project. However you decide to organize things is completely fine with me!

neroux commented 1 year ago

@igr, the thing that's not entirely clear to me is why the constructor was dropped? That seems to me like a rather unnecessary breaking change. Providing of itself is already a sort of duplication, but that's all right for those who prefer that over the constructor, but why dropping the constructor?

neroux commented 1 year ago

@igr?

igr commented 1 year ago

Hi @neroux! I don't have a strong opinion on this one. Here is how I see it:

In short, this class is all about precise calculation; and I appreciated less code in this case, that is all. Not that I would make a rule from it :)

igr commented 1 month ago

@cusher please take a look at: https://github.com/igr/julian-day

I have redone the calculations and introduced long-needed separation of gregorian and julian calendars.