next up previous
Next: SLA_DJCL - MJD to Year,Month,Day,Frac
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_DIMXV - Apply 3D Reverse Rotation

SLA_DJCAL - MJD to Gregorian for Output   

ACTION:
Modified Julian Date to Gregorian Calendar Date, expressed in a form convenient for formatting messages (namely rounded to a specified precision, and with the fields stored in a single array).

CALL:
CALL sla_DJCAL (NDP, DJM, IYMDF, J)

GIVEN:

NDP I number of decimal places of days in fraction
DJM D modified Julian Date (JD-2400000.5)

RETURNED:

IYMDF I(4) year, month, day, fraction in Gregorian calendar
J I status: nonzero = out of range

NOTES:
1.
Any date after 4701BC March 1 is accepted.
2.
NDP should be 4 or less to avoid overflow on machines which use 32-bit integers.

REFERENCE:
The algorithm is derived from that of Hatcher, Q.Jl.R.astr.Soc. (1984) 25, 53-55.


next up previous
Next: SLA_DJCL - MJD to Year,Month,Day,Frac
Up: SUBPROGRAM SPECIFICATIONS
Previous: SLA_DIMXV - Apply 3D Reverse Rotation

SLALIB --- Positional Astronomy Library
Starlink User Note 67
P. T. Wallace
12 October 1999
E-mail:ptw@star.rl.ac.uk