@hebcal/hdate
    Preparing search index...

    Function getYahrzeit

    • Calculates yahrzeit and converts the result to a Gregorian Date.

      See getYahrzeitHD for a description of the algorithm.

      Parameters

      • hyear: number

        Hebrew year in which to find the anniversary

      • date: AnniversaryDate

        Gregorian or Hebrew date of death

      Returns Date | undefined

      anniversary occurring in hyear as a Gregorian date, or undefined when hyear is on or before the year of death

      Use yahrzeit instead, which returns an HDate. Returning a Gregorian Date loses the Hebrew date that was actually computed and invites a needless conversion back again; call .greg() on the result if you really do want a Date.

      import {getYahrzeit} from '@hebcal/hdate';
      const dt = new Date(2014, 2, 2); // '2014-03-02' == '30 Adar I 5774'
      const anniversary = getYahrzeit(5780, dt); // '2/25/2020' == '30 Sh\'vat 5780'