Added in API level 26

HijrahDate

public final class HijrahDate
extends Object implements ChronoLocalDate, Serializable, Temporal, TemporalAdjuster

java.lang.Object
   ↳ java.time.chrono.HijrahDate


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(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.

Summary

Public methods

ChronoLocalDateTime<HijrahDate> atTime(LocalTime localTime)

Combines this date with a time to create a ChronoLocalDateTime.

boolean equals(Object obj)

Compares this date to another date, including the chronology.

static HijrahDate from(TemporalAccessor temporal)

Obtains a HijrahDate of the Islamic Umm Al-Qura calendar from a temporal object.

HijrahChronology getChronology()

Gets the chronology of this date, which is the Hijrah calendar system.

HijrahEra getEra()

Gets the era applicable at this date.

long getLong(