SLA_CALDJ

Calendar Date to MJD

ACTION:
Gregorian Calendar to Modified Julian Date, with century default.
CALL:
CALL sla_CALDJ (IY, IM, ID, DJM, J)
GIVEN:

IY,IM,ID

I

year, month, day in Gregorian calendar


RETURNED:

DJM

D

modified Julian Date (JD2400000.5) for 0h

J

I

status:

  0 = OK

  1 = bad year (MJD not computed)

  2 = bad month (MJD not computed)

  3 = bad day (MJD computed)


NOTES:
(1)
This routine supports the century default feature. Acceptable years are:
  • 00-49, interpreted as 2000 – 2049,
  • 50-99, interpreted as 1950 – 1999, and
  • 100 upwards, interpreted literally.

For 1-100AD use the routine sla_CLDJ instead.

(2)
For year nBC use IY = (n 1).
(3)
When an invalid year or month is supplied (status J = 1 or 2) the MJD is not computed. When an invalid day is supplied (status J = 3) the MJD is computed.