Options
All
  • Public
  • Public/Protected
  • All
Menu

Module JDNConvertibleConversionModule

Index

Functions

Const JDCToGregorian

  • Converts a JDC to a Gregorian Calendar date.

    Conversion algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 63pp.

    There is a year 0.

    Parameters

    • jdc: JDC

      JDC to be converted to a Gregorian calendar date.

    Returns CalendarDate

    the Gregorian calendar date created from the given JDC.

Const JDCToIslamic

  • Converts a JDC to an Islamic calendar date.

    Algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 75pp.

    The first day of the Islamic calendar according to this algorithm is July 16th, 622 CE (Julian; JDC = 1948439.5). This is in agreement with the widely used tables of Wuestenfeld et al., Wuestenfeld-Mahler'sche Vergleichungs-Tabellen zur muslimischen und iranischen Zeitrechnung, 1961. However, it is well known that these calendar dates may be off by 1 to 2 days in comparison to the calendar that was actually used, especially if historical dates are concerned. There are two more points of concern: Sura 9, 36-37 of the Koran suggests that a lunar calendar without intercalation was applied from year 10 of the Hijra onwards only; earlier on, probably a luni-solar calendar was used. This algorithm assumes that a lunar calendar without any intercalation started in year 1 of the Hijra. Secondly, in many countries the first actual sighting of the lunar crescent was decisive for the beginning of a new month up to quite recent times, but not a regular scheme. This introduces a dependency on the location: a new Islamic calendar month may have started on different days in different locations. Unambiguous conversion of historical Islamic dates into Julian or Gregorian calendar dates or vice cersa can only be achieved if the day of the week is known in addition.

    Parameters

    • jdc: JDC

      JDC to be converted to an Islamic calendar date.

    Returns CalendarDate

    Islamic calendar date created from given JDC.

Const JDCToJulian

  • Converts a JDC to a Julian Calendar date.

    Conversion algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 63pp.

    There is a year 0.

    Parameters

    • jdc: JDC

      JDC to be converted to a Julian calendar date.

    Returns CalendarDate

    Julian calendar date created from given JDC.

Const JDNToGregorian

Const JDNToIslamic

  • Converts a JDN to an Islamic calendar date.

    Parameters

    • jdn: JDN

      JDN to be converted to an Islamic calendar date.

    Returns CalendarDate

    @returns Islamic calendar date created from given JDN.

Const JDNToJulian

  • Converts a JDN to a Julian calendar date.

    Parameters

    • jdn: JDN

      JDN to be converted to a Julian calendar date.

    Returns CalendarDate

    Julian calendar date created from given JDN.

Const dayOfWeekFromJDC

  • dayOfWeekFromJDC(jdc: JDC): number
  • Determine the day of week from the given JDN. Works only for calendars which use the 7 day week with Sunday to Saturday.

    Algorithm from: Jean Meeus: Astronomical Algorithms, 1998, p. 65.

    Parameters

    • jdc: JDC

      given JDC.

    Returns number

    the number of the day of the week for the given JDC (0 Sunday, 1 Monday, 2 Tuesday, 3 Wednesday, 4 Thursday, 5 Friday, 6 Saturday).

Const gregorianToJDC

  • Converts a Gregorian calendar date to a JDC.

    Conversion algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 60pp.

    There is a year 0.

    Parameters

    • calendarDate: CalendarDate

      Gregorian calendar date to be converted to JDC.

    Returns JDC

    the JDC representing the given Gregorian calendar date.

Const gregorianToJDN

  • Converts a Gregorian calendar date to a JDN.

    Parameters

    • calendarDate: CalendarDate

      Gregorian calendar date to be converted to JDN.

    Returns JDN

    the JDN representing the given Gregorian calendar date.

Const islamicToJDC

  • Converts an Islamic calendar date to a JDC.

    Algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 73pp.

    The first day of the Islamic calendar according to this algorithm is July 16th, 622 CE (Julian; JDC = 1948439.5). This is in agreement with the widely used tables of Wuestenfeld et al., Wuestenfeld-Mahler'sche Vergleichungs-Tabellen zur muslimischen und iranischen Zeitrechnung, 1961. However, it is well known that these calendar dates may be off by 1 to 2 days in comparison to the calendar that was actually used, especially if historical dates are concerned. There are two more points of concern: Sura 9, 36-37 of the Koran suggests that a lunar calendar without intercalation was applied from year 10 of the Hijra onwards only; earlier on, probably a luni-solar calendar was used. This algorithm assumes that a lunar calendar without any intercalation started in year 1 of the Hijra. Secondly, in many countries the first actual sighting of the lunar crescent was decisive for the beginning of a new month up to quite recent times, but not a regular scheme. This introduces a dependency on the location: a new Islamic calendar month may have started on different days in different locations. Unambiguous conversion of historical Islamic dates into Julian or Gregorian calendar dates or vice cersa can only be achieved if the day of the week is known in addition.

    Parameters

    • calendarDate: CalendarDate

      Islamic calendar date to be converted to JDC.

    Returns JDC

    JDC representing the given Islamic calendar date.

Const islamicToJDN

  • Converts an Islamic calendar date to a JDN.

    Parameters

    • calendarDate: CalendarDate

      Islamic calendar date to be converted to JDN.

    Returns JDN

    JDN representing the given Islamic calendar date.

Const julianToJDC

  • Converts a Julian calendar date to a JDC.

    Conversion algorithm from: Jean Meeus, Astronomical Algorithms, 1998, 60pp.

    There is a year 0.

    Parameters

    • calendarDate: CalendarDate

      Julian calendar date to be converted to JDC.

    Returns JDC

    JDC representing the given Julian calendar date.

Const julianToJDN

  • Converts a Julian calendar date to a JDN.

    Parameters

    • calendarDate: CalendarDate

      Julian calendar date to be converted to JDN.

    Returns JDN

    JDN representing the given Julian calendar date.

Const truncateDecimals

  • truncateDecimals(num: number): number

Generated using TypeDoc