Enum Class HebrewAnniversary

java.lang.Object
java.lang.Enum<HebrewAnniversary>
net.time4j.calendar.HebrewAnniversary
All Implemented Interfaces:
Serializable, Comparable<HebrewAnniversary>, java.lang.constant.Constable

public enum HebrewAnniversary extends Enum<HebrewAnniversary>

The Hebrew calendar has at least two important personal days which can be determined by the methods of this class.

Since:
3.37/4.32
Author:
Meno Hochschild
  • Enum Constant Details

    • BIRTHDAY

      public static final HebrewAnniversary BIRTHDAY
      Marks the annual birthday in hebrew calendar.

      The underlying rule takes care of possible leap days (relevant for HESHVAN and KISLEV) and leap months. Example for determining the 13th birthday of a boy born in AM-5776-ADAR_I-30 (bar mitzvah):

           HebrewCalendar birth = HebrewCalendar.of(5776, HebrewMonth.ADAR_I, 30);
           assertThat(
                birth.get(HebrewAnniversary.BIRTHDAY.inHebrewYear(birth.getYear() + 13)),
                is(HebrewCalendar.of(5789, HebrewMonth.NISAN, 1)));
       

      Note: The predefined method HebrewCalendar.barMitzvah() is simpler to use for this special purpose.

    • YAHRZEIT

      public static final HebrewAnniversary YAHRZEIT
      Marks the annual death day of a near relative in hebrew calendar.

      The rules follows the book "Calendrical Calculations" by Dershowitz/Reingold. Some Jewish communities might deviate from these rules, however.

  • Method Details

    • values

      public static HebrewAnniversary[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HebrewAnniversary valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • inHebrewYear

      public ChronoFunction<CalendarDate,​HebrewCalendar> inHebrewYear(int hyear)

      Determines the input calendar date as original event date and determines the anniversary day of this event in given hebrew year.

      Parameters:
      hyear - hebrew year
      Returns:
      chronological function which determines the anniversary for any calendar date
    • inGregorianYear

      public ChronoFunction<CalendarDate,​List<PlainDate>> inGregorianYear(int gyear)

      Determines the input calendar date as original event date and determines the anniversary days of this event in given gregorian year.

      Parameters:
      gyear - gregorian year
      Returns:
      chronological function which determines the temporally sorted anniversaries for any calendar date