slaDjcal -
SYNOPSYS
void slaDjcal(ndp, djm, iymdf, j)
PARAMETERS
- int ndp
-
- double djm
-
- int *iymdf
-
- int *j
-
DESCRIPTION
Modified Julian Date to Gregorian calendar, expressed
in a form convenient for formatting messages (namely
rounded to a specified precision, and with the fields
stored in a single array).
Given
ndp int number of decimal places of days in fraction
djm double Modified Julian Date (JD-2400000.5)
Returned
iymdf int[4] year, month, day, fraction in Gregorian calendar
*j long status: nonzero = out of range
Any date after 4701BC March 1 is accepted.
Large ndp values risk internal overflows. It is typically safe
to use up to ndp=4.
The algorithm is derived from that of Hatcher 1984 (QJRAS 25, 53-55).
P.T.Wallace Starlink 31 October 1993
SEE ALSO