LocalDate implements the {@link ReadablePartial} interface.To do this, the interface methods focus on the key fields - Year, MonthOfYear and DayOfMonth. However, all date fields may in fact be queried.
LocalDate differs from DateMidnight in that this class does not have a time zone and does not represent a single instant in time.
Calculations on LocalDate are performed using a {@link Chronology}. This chronology will be set internally to be in the UTC time zone for all calculations.
Each individual field can be queried in two ways:
getMonthOfYear()
monthOfYear().get()
LocalDate is thread-safe and immutable, provided that the Chronology is as well. All standard Chronology classes supplied are thread-safe and immutable. @author Stephen Colebourne @since 1.3
{@code LocalDate} is an immutable date-time object that represents a date,often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a {@code LocalDate}.
This class does not store or represent a time or time-zone. Instead, it is a description of the date, as used for birthdays. It cannot represent an instant on the time-line without additional information such as an offset or time-zone.
The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. It is equivalent to the proleptic Gregorian calendar system, in which today's rules for leap years are applied for all time. For most applications written today, the ISO-8601 rules are entirely suitable. However, any application that makes use of historical dates, and requires them to be accurate will find the ISO-8601 approach unsuitable.
This is a value-based class; use of identity-sensitive operations (including reference equality ( {@code ==}), identity hash code, or synchronization) on instances of {@code LocalDate} may have unpredictable results and should be avoided.The {@code equals} method should be used for comparisons. @implSpec This class is immutable and thread-safe. @since 1.8
LocalDate is an immutable calendrical that represents a date, often viewed as year-month-day. This object can also access other date fields such as day-of-year, day-of-week and week-of-year.
This class does not store or represent a time or time zone. Thus, for example, the value "2nd October 2007" can be stored in a LocalDate.
The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. It is equivalent to the proleptic Gregorian calendar system, in which todays's rules for leap years are applied for all time. For most applications written today, the ISO-8601 rules are entirely suitable.
However, any application that makes use of historical dates and requires them to be accurate will find the ISO-8601 rules unsuitable. In this case, the application code should use {@code HistoricDate} and define an explicitcutover date between the Julian and Gregorian calendar systems.
LocalDate is immutable and thread-safe. @author Michael Nascimento Santos @author Stephen Colebourne
LocalDate implements the {@link ReadablePartial} interface.To do this, the interface methods focus on the key fields - Year, MonthOfYear and DayOfMonth. However, all date fields may in fact be queried.
LocalDate differs from DateMidnight in that this class does not have a time zone and does not represent a single instant in time.
Calculations on LocalDate are performed using a {@link Chronology}. This chronology will be set internally to be in the UTC time zone for all calculations.
Each individual field can be queried in two ways:
getMonthOfYear()
monthOfYear().get()
LocalDate is thread-safe and immutable, provided that the Chronology is as well. All standard Chronology classes supplied are thread-safe and immutable. @author Stephen Colebourne @since 1.3
{@code LocalDate} is an immutable date-time object that represents a date,often viewed as year-month-day. Other date fields, such as day-of-year, day-of-week and week-of-year, can also be accessed. For example, the value "2nd October 2007" can be stored in a {@code LocalDate}.
This class does not store or represent a time or time-zone. Instead, it is a description of the date, as used for birthdays. It cannot represent an instant on the time-line without additional information such as an offset or time-zone.
The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. It is equivalent to the proleptic Gregorian calendar system, in which today's rules for leap years are applied for all time. For most applications written today, the ISO-8601 rules are entirely suitable. However, any application that makes use of historical dates, and requires them to be accurate will find the ISO-8601 approach unsuitable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|