-
Bug
-
Resolution: Fixed
-
P4
-
23
-
master
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
MacOS Version 14.7 (23H124)
openjdk version "23" 2024-09-17
OpenJDK Runtime Environment (build 23+37-2369)
OpenJDK 64-Bit Server VM (build 23+37-2369, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
ChronoUnit.MONTH is expected to return the number of months between two given Temporals. However it fails in the following case.
ChronoUnit.MONTH.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00")) returns 4 instead of 5.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.time.temporal.ChronoUnit;
import java.time.LocalDateTime;
ChronoUnit.MONTHS.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00"));
---------- BEGIN SOURCE ----------
import java.time.temporal.ChronoUnit;
import java.time.LocalDateTime;
ChronoUnit.MONTHS.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00"));
---------- END SOURCE ----------
MacOS Version 14.7 (23H124)
openjdk version "23" 2024-09-17
OpenJDK Runtime Environment (build 23+37-2369)
OpenJDK 64-Bit Server VM (build 23+37-2369, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
ChronoUnit.MONTH is expected to return the number of months between two given Temporals. However it fails in the following case.
ChronoUnit.MONTH.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00")) returns 4 instead of 5.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
import java.time.temporal.ChronoUnit;
import java.time.LocalDateTime;
ChronoUnit.MONTHS.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00"));
---------- BEGIN SOURCE ----------
import java.time.temporal.ChronoUnit;
import java.time.LocalDateTime;
ChronoUnit.MONTHS.between(LocalDateTime.parse("2024-09-29T06:03:00"), LocalDateTime.parse("2025-02-28T06:04:00"));
---------- END SOURCE ----------
- links to
-
Commit(master) openjdk/jdk/32f2c2d8
-
Review(master) openjdk/jdk/23937