Module java.base

Class HijrahDate

java.lang.Object
java.time.chrono.HijrahDate
All Implemented Interfaces:
Serializable, Comparable<ChronoLocalDate>, ChronoLocalDate, Temporal, TemporalAccessor, TemporalAdjuster

public final class HijrahDate extends Object implements ChronoLocalDate, Serializable
A date in the Hijrah calendar system.

This date operates using one of several variants of the Hijrah calendar.

The Hijrah calendar has a different total of days in a year than Gregorian calendar, and the length of each month is based on the period of a complete revolution of the moon around the earth (as between successive new moons). Refer to the HijrahChronology for details of supported variants.

Each HijrahDate is created bound to a particular HijrahChronology, The same chronology is propagated to each HijrahDate computed from the date. To use a different Hijrah variant, its HijrahChronology can be used to create new HijrahDate instances. Alternatively, the withVariant(java.time.chrono.HijrahChronology) method can be used to convert to a new HijrahChronology.

This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail. The equals method should be used for comparisons.

Implementation Requirements:
This class is immutable and thread-safe.
Since:
1.8
See Also: