Function abs2greg

  • Converts from Rata Die (R.D. number) to Gregorian date. See the footnote on page 384 of ``Calendrical Calculations, Part II: Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and Experience, Volume 23, Number 4 (April, 1993), pages 383-404 for an explanation.

    Note that this function returns the daytime portion of the date. For example, the 15th of Cheshvan 5769 began at sundown on 12 November 2008 and continues through 13 November 2008. This function would return only the date 13 November 2008.

    Parameters

    • abs: number

      R.D. number of days

    Returns Date

    const abs = hebrew2abs(5769, months.CHESHVAN, 15);
    const date = abs2greg(abs); // 13 November 2008
    const year = date.getFullYear(); // 2008
    const monthNum = date.getMonth() + 1; // 11
    const day = date.getDate(); // 13