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.