-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 9
-
Component/s: core-libs
-
b94
External question sites indicate that users have difficulty converting between java.util.Date and LocalDate, and also between Instant and LocalDate/LocalTime. This user difficulty can be resolved with some additional methods.
Currently, the following methods exist:
ZonedDateTime.ofInstant(Instant, ZoneId);
OffsetDateTime.ofInstant(Instant, ZoneId);
LocalDateTime.ofInstant(Instant, ZoneId);
OffsetTime.ofInstant(Instant, ZoneId);
This enhancement proposes to add the same method to LocalDate and LocalTime. It can reasonably be argued this was a simple oversight in the original development.
Currently, the following methods exist:
ZonedDateTime.ofInstant(Instant, ZoneId);
OffsetDateTime.ofInstant(Instant, ZoneId);
LocalDateTime.ofInstant(Instant, ZoneId);
OffsetTime.ofInstant(Instant, ZoneId);
This enhancement proposes to add the same method to LocalDate and LocalTime. It can reasonably be argued this was a simple oversight in the original development.