Skip to content

Various bug fixes and improvements to the 3.0 migration.#261

Merged
KosherJava merged 45 commits into
KosherJava:3-0-modernizationfrom
dickermoshe:bug-fixes
Mar 23, 2026
Merged

Various bug fixes and improvements to the 3.0 migration.#261
KosherJava merged 45 commits into
KosherJava:3-0-modernizationfrom
dickermoshe:bug-fixes

Conversation

@dickermoshe

Copy link
Copy Markdown
Contributor

I have broken this up into neatly sectioned commits to make it easier to review.
Each commit it is focused on a single file and details all the changes that were made.

dickermoshe and others added 30 commits March 16, 2026 08:42
…e correct SUNRISE enum in getInstantFromTime
Fix javadoc on `isUseElevation`
- Remove zmanim which are no longer in KJ
- Pass correct args to `getMinchaGedolaGreaterThan30`
- Update docs on `getLocalMeanTimeOffset` to reflect changes made in earlier commits. We now return the actual offset instead the "Standard Offset"
- `setLongitude` was not validating the correct variable. This has been fixes.
- Remove unnecessary variable instantiation.
- Remove timezone offset  from toXML and toString.
- Use the dedicated methods for Long.hashCode.
- Remove unnecessary casting.
- Use dedicated Long.compare instead of hand-rolled comparator.
- Add null checking to toXML and to toString.
- `getTime` will properly return a negative time.
dickermoshe and others added 15 commits March 23, 2026 12:46
- Automated code fixes by IntelliJ to simplify the return values.
- Remove unnecessary variables.
- Implement hashCode and equal method.
Most of these improvements were automated by IntelliJ.

- Mark final fields with the `final` keyword.
- Removed unused commented code.
- Format negative times properly.
- Use the modern for loop.
- Remove unnecessary casting.
- Convert integer values to long before casting.
- Break out duplicated if checks into variables.
- Fix the off-by-a-second bug.
- Fix getLocalMeanTime to use a local time class instead of a double.
- No longer use getInstantFromTime in getLocalMeanTime.
- Implement strict equals on the `equal` function.
- Equality and hashCode now properly take into account the various fields of the calendar.
- Use `Double.hashCode` instead of complex alternatives.
- Update `getFixedLocalChatzos` to use the correct arguments for getLocalMeanTime
- Remove unnecessary variable instantiations.
- Remove unnecessary and variable instantiations.
- Implement hashCode and equals properly.
- Use the correct variable names in duration comparator.
- Set a time zone for the DateTimeFormatter in toXML.
…java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

@KosherJava KosherJava left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Committing for testing

@KosherJava
KosherJava merged commit 0d88687 into KosherJava:3-0-modernization Mar 23, 2026
1 check passed
binyaz pushed a commit to binyaz/zmanim that referenced this pull request Jun 28, 2026
)

* Migrate AstronomicalCalendar to use LocalDate - Fix Timezone Bug - Use correct SUNRISE enum in getInstantFromTime

* Fix Javadocs

* Rename getSunrise to getSunriseWithElevation.
Fix javadoc on `isUseElevation`

* Rename getElevationAdjustedSunset/rise to avoid further confusion.

* Fix incorrect adjustment for getFixedLocalChatzos

* Update date

* revert

* implement jewishdate

* some eq changes

* nuller

* fix formaterr, etc.

* more changes

* configure addYears

* more date changes

* Fix molad

* Modifying a JewishDate no longer resets the molad date

* add est jewish month

* Remove get local mean time fix.

* Fix RegressionTestFileWriter

- Remove zmanim which are no longer in KJ
- Pass correct args to `getMinchaGedolaGreaterThan30`

* Fix Geolocation

- Update docs on `getLocalMeanTimeOffset` to reflect changes made in earlier commits. We now return the actual offset instead the "Standard Offset"
- `setLongitude` was not validating the correct variable. This has been fixes.
- Remove unnecessary variable instantiation.
- Remove timezone offset  from toXML and toString.
- Use the dedicated methods for Long.hashCode.
- Remove unnecessary casting.

* Add .class files to the.gitignore.

* Remove unnecessary variable instantiation on HebrewDateFormatter.

* Fixes for Zman class.

- Use dedicated Long.compare instead of hand-rolled comparator.
- Add null checking to toXML and to toString.

* Fixed Time class

- `getTime` will properly return a negative time.

* Simplify TefilaRules

- Automated code fixes by IntelliJ to simplify the return values.

* Improvements to AstronomicalCalculator

- Remove unnecessary variables.
- Implement hashCode and equal method.

* Remove unnecessary imports from YomiCalculator

* Improvements to ZmanimFormatter

Most of these improvements were automated by IntelliJ.

- Mark final fields with the `final` keyword.
- Removed unused commented code.
- Format negative times properly.
- Use the modern for loop.
- Remove unnecessary casting.
- Convert integer values to long before casting.
- Break out duplicated if checks into variables.

* Improvements to AstronomicalCalendar.

- Fix the off-by-a-second bug.
- Fix getLocalMeanTime to use a local time class instead of a double.
- No longer use getInstantFromTime in getLocalMeanTime.
- Implement strict equals on the `equal` function.
- Equality and hashCode now properly take into account the various fields of the calendar.

* Remove unnecessary variables from NOAACalculator

* Improve AstronomicalCalculator

- Use `Double.hashCode` instead of complex alternatives.

* Improve ComprehensiveZmanimCalendar

- Update `getFixedLocalChatzos` to use the correct arguments for getLocalMeanTime
- Remove unnecessary variable instantiations.

* Improve ZmanimCalendar

- Remove unnecessary and variable instantiations.
- Implement hashCode and equals properly.

* Fix Zman class.

- Use the correct variable names in duration comparator.
- Set a time zone for the DateTimeFormatter in toXML.

* Fix JewishDate tests.

* Add various regression tests

* Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants