next up previous 269
Next: SLA_CLYD - Calendar to Year, Day
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_CD2TF - Days to Hour,Min,Sec


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 (JD$-$2400000.5) for $0^{\rm h}$
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 $n$BC 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.


next up previous 269
Next: SLA_CLYD - Calendar to Year, Day
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_CD2TF - Days to Hour,Min,Sec

SLALIB --- Positional Astronomy Library
Starlink User Note 67
P. T. Wallace
19 December 2005
E-mail:ussc@star.rl.ac.uk

Copyright © 2010 Science and Technology Facilities Council