Java
The java.time API: LocalDate, LocalTime and LocalDateTime
The modern date and time API is immutable, thread safe and clearly named, and it replaced the older Date and Calendar classes entirely.
The java.time API, instants, durations, periods, zones and formatting.
3 notes
The modern date and time API is immutable, thread safe and clearly named, and it replaced the older Date and Calendar classes entirely.
Instant marks a point on the timeline; Duration measures time based amounts and Period measures date based ones.
DateTimeFormatter converts between text and date time values, and ZoneId handles the region rules that make time zones difficult.