@hebcal/core
    Preparing search index...

    Class RoshChodeshEvent

    Represents Rosh Chodesh, the beginning of a new month

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    alarm?: string | boolean | Date

    Alarms are used by iCalendar feeds

    cholHaMoedDay?: number

    During Sukkot or Pesach

    date: HDate

    Hebrew date of this event

    desc: string

    Untranslated title of this event. Note that these description strings are always in English and will remain stable across releases. To get the title of the event in another language, use the render() method.

    emoji?: string

    Optional emoji character such as ✡️, 🕯️, 🕎, 🕍, 🌒

    mask: number

    Bitmask of optional event flags. See flags

    memo?: string

    Optional longer description or memo text

    observed?: boolean

    true if the fast day was postponed a day to avoid Shabbat.

    • Tish'a B'Av postponed from the 9th to the 10th
    • Tzom Tammuz postponed from the 17th to the 18th

    Methods

    • Returns a simplified (untranslated) name for this holiday, stripping qualifiers so that related events group under one name.

      Strips trailing 4-digit years, (CH''M), (observed), (Hoshana Raba), Roman-numeral day numbers ( I, II, ...), Chanukah candle counts, : 8th Day, and a leading "Erev ".

      Returns string

      // 'Erev Pesach'           => 'Pesach'
      // 'Sukkot III (CH''M)' => 'Sukkot'
      // 'Chanukah: 5 Candles' => 'Chanukah'
      // 'Rosh Hashana 5784' => 'Rosh Hashana'
    • Returns an array of category strings classifying this event, derived from its flags bitmask. The first element is the broad category (e.g. 'holiday', 'roshchodesh', 'parashat', 'omer'), followed by zero or more refinements (e.g. 'major', 'minor', 'fast').

      Returns ['unknown'] if no flag maps to a known category.

      Returns string[]

      import {Event, HDate, flags} from '@hebcal/core';
      new Event(new HDate(10, 'Tishrei', 5784), 'Yom Kippur', flags.MAJOR_FAST)
      .getCategories(); // ['holiday', 'major', 'fast']
      new Event(new HDate(1, 'Shvat', 5784), 'Rosh Chodesh Sh\'vat', flags.ROSH_CHODESH)
      .getCategories(); // ['roshchodesh']
    • Untranslated title of this event. Note that these description strings are always in English and will remain stable across releases. To get the title of the event in another language, use the render() method.

      Returns string

    • Returns the event's emoji character (e.g. 🕯️, 🕎, 🇮🇱, 🍏🍯), or null if no emoji is associated with this event. Subclasses override this to provide holiday-specific emoji.

      Returns string

    • Is this event observed in Israel/Diaspora?

      Parameters

      • il: boolean

      Returns boolean

      const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
      ev1.observedIn(false); // true
      ev1.observedIn(true); // false
      const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
      ev2.observedIn(false); // true
      ev2.observedIn(true); // true
    • Is this event observed in the Diaspora?

      Returns boolean

      const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
      ev1.observedInDiaspora(); // true
      const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
      ev2.observedInDiaspora(); // true
    • Is this event observed in Israel?

      Returns boolean

      const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
      ev1.observedInIsrael(); // false
      const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
      ev2.observedInIsrael(); // true
    • Returns (translated) description of this event

      Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

    • Returns a brief (translated) description of this event. For most events, this is the same as render(). For some events, it procudes a shorter text (e.g. without a time or added description).

      Parameters

      • Optionallocale: string

        Optional locale name (defaults to empty locale)

      Returns string

    • Returns a https://www.hebcal.com/holidays/... URL for more detail on this holiday. Israel-only holidays get an ?i=on query parameter. Returns undefined for years outside [100, 2999].

      Returns string | undefined