@hebcal/hdate
    Preparing search index...

    Function greg2abs

    • Converts Gregorian date to absolute R.D. (Rata Die) days. R.D. 1 is the imaginary date Monday, January 1, 1 (Gregorian).

      Only the local-time year, month and day of date are used; hours, minutes, seconds and milliseconds are ignored.

      Dates are interpreted on the proleptic Gregorian calendar, which applies the Gregorian rules uniformly to every year without the ten-day discontinuity of the Gregorian Reformation of 1582.

      Parameters

      • date: Date

        Gregorian date

      Returns number

      R.D. number of days

      if date is not a Date

      if date is an Invalid Date

      greg2abs(new Date(2008, 10, 13)); // 733359 (13 November 2008)
      greg2abs(new Date(2005, 3, 2)); // 732038 (2 April 2005)