@hebcal/hdate
    Preparing search index...

    Function getYahrzeitHD

    • Same calculation as getYahrzeit, but returns the result as a SimpleHebrewDate ({yy, mm, dd}) rather than converting to a Gregorian Date. Useful when the caller needs the Hebrew date directly (e.g. for rendering with gematriya or further Hebrew-calendar arithmetic) and wants to avoid an extra R.D. → Gregorian round-trip.

      See getYahrzeit for the full description of the algorithm and edge cases (Marcheshvan 30, Kislev 30, Adar I / Adar II).

      Parameters

      • hyear: number

        Hebrew year in which to find the anniversary

      • date: AnniversaryDate

        Gregorian or Hebrew date of death

      Returns SimpleHebrewDate | undefined

      anniversary occurring in hyear, or undefined when hyear is on or before the original year

      import {getYahrzeitHD} from '@hebcal/hdate';
      const dt = new Date(2014, 2, 2); // 30 Adar I 5774
      getYahrzeitHD(5780, dt); // {yy: 5780, mm: 11, dd: 30} (30 Sh'vat)