SLA_CLDJ

Calendar to MJD

ACTION:
Gregorian Calendar to Modified Julian Date.
CALL:
CALL sla_CLDJ (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

  2 = bad month

  3 = bad day


NOTES:
(1)
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.
(2)
The year must be 4699 (i.e. 4700BC) or later. For year nBC use IY = (n 1).
(3)
An alternative to the present routine is sla_CALDJ, which accepts a year with the century missing.
REFERENCE:
The algorithm is adapted from Hatcher, Q. Jl. R. astr. Soc. (1984) 25, 53-55.