16.7 Date-Time API
The java.time package is based on the standardized calendar system of ISO-8601, and this covers how a date is represented, including time, date and time, UTC, time intervals (duration/time span), and time zones. The implementation is based on the Gregorian calendar, although other calendar types are also conceivable. Java’s calendar system can use other standards or implementations as well, including the Unicode Common Locale Data Repository (CLDR) for localizing days of the week or the Time-Zone Database (TZDB) , which documents all time zone changes since 1970.
16.7.1 Initial Overview
The central temporal types from the Date-Time API can be quickly documented:
|
Type |
Description |
Field(s) |
|---|---|---|
|
LocalDate |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access