Class HebrewCalendar

All Implemented Interfaces:
Serializable, Comparable<HebrewCalendar>, CalendarDate, ChronoDisplay, Temporal<CalendarDate>, LocalizedPatternSupport

@CalendarType("hebrew") public final class HebrewCalendar extends Calendrical<HebrewCalendar.Unit,​HebrewCalendar> implements LocalizedPatternSupport

Represents the calendar used by the worldwide Jewish community, but mainly in Israel for religious purposes.

Introduction

It is a lunisolar calendar which defines years consisting of 12 or 13 months. The month cycle generally follows the lunar cycle of synodic moon. However, every two or three years, an extra leap month called ADAR-I will be inserted to synchronize the calendar with the solar year. This is done by help of the metonic cycle. This synchronization is not perfect because the mean length of the hebrew year of 365.2468 days is slightly longer than the tropical solar year. See also Wikipedia. The implementation of this calendar is based on the book "Calendrical calculations" of Dershowitz/Reingold. The hebrew day starts at sunset on the previous day. By default and as rough approximation, the time 18:00 o'clock is used - especially in case of missing geographic location. However, Time4J enables users to use the exact astronomical sunset as begin of day for religious purposes.

Following elements which are declared as constants are registered by this class

Furthermore, all elements defined in EpochDays and CommonElements are supported.

Formatting of the month Adar-II

The month Adar-II is printed in different ways dependent on if the associated year is a leap year or not.

     HebrewCalendar date = HebrewCalendar.of(5778, HebrewMonth.ADAR_II, 29);
     ChronoFormatter<HebrewCalendar> f =
          ChronoFormatter.ofPattern(
              "MMMM, dd (yyyy)",
              PatternType.CLDR_DATE,
              Locale.US,
              HebrewCalendar.axis());
     assertThat(f.format(date), is("Adar, 29 (5778)")); // no leap year
     assertThat(f.format(date.plus(1, HebrewCalendar.Unit.YEARS)), is("Adar II, 29 (5779)"));
 

Support for unicode ca-extensions

      Locale locale = Locale.forLanguageTag("en-u-ca-hebrew");
      ChronoFormatter<CalendarDate> f = ChronoFormatter.ofGenericCalendarStyle(DisplayMode.FULL, locale);
      assertThat(
          f.format(PlainDate.of(2017, 10, 1)),
          is("Sunday, Tishri 11, 5778 AM"));
 
Since:
3.37/4.32
Author:
Meno Hochschild
See Also:
HebrewAnniversary, HebrewMonth, HebrewTime, Serialized Form