AmarGhugare opened a new pull request, #1864:
URL: https://github.com/apache/commons-lang/pull/1864

   Addresses [LANG-598](https://issues.apache.org/jira/browse/LANG-598).
   
   The existing `isSameDay(Date, Date)` overload uses the JVM default time 
zone. Callers comparing dates in another zone currently have to construct 
`Calendar` objects themselves. For example, `2024-01-02T04:30:00Z` and 
`2024-01-02T05:30:00Z` fall on the same day in Los Angeles but on different 
days in New York.
   
   Add `isSameDay(Date, Date, TimeZone)`, reusing the existing 
`toCalendar(Date, TimeZone)` conversion and calendar comparison. The supplied 
zone applies to both dates. Null dates or a null zone throw 
`NullPointerException`, consistently with the conversion helper. Existing 
overload behavior is preserved.
   
   The change adds the Date overload requested by the issue. The older attached 
patch's changes to existing Calendar comparisons are outside this PR's scope.
   
   Validation:
   - All 158 `DateUtilsTest` cases pass, including 16 new cases covering 
midnight and year boundaries, leap day, DST transitions, the repeated fall-back 
hour, null arguments, input preservation and the JVM default zone.
   - Default Maven build passes: 108,498 tests, zero failures/errors, 18 
skipped.
   - Coverage, RAT, Checkstyle, compatibility, SpotBugs, PMD and Javadoc checks 
pass.
   - `git diff --check` passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to