|
|
|
|
|
|
|
7.5 JD0_to_gregorian_proleptic () |
|
|
|
|
|
|
|
|
The routine JD02grep.c (Listing 7.4) returns the Gregorian proleptic calendar date given a Julian Day number (type double). |
|
|
|
|
|
|
|
|
7.6 julian_to_gregorian () |
|
|
|
|
|
|
|
|
The routine jul2greg.c (Listing 7.5) converts a proleptic Julian calendar date into the corresponding proleptic Gregorian calendar date. |
|
|
|
|
| Listing 7.4 JD0_to_gregorian_proleptic () | |
|
|
|
|
/* JD02grep.c
+-------------------------------------------+
| Copyright (C) 1995 by Lance W. Latham. |
| All rights reserved. |
+-------------------------------------------+
Returns the Gregorian proleptic calendar date a given Julian Day
number (type double).
INPUTS:
1. jd, type double, the Julian Day number to convert to a Gregorian
proleptic calendar date. Valid values are 'jd' >= 0.0;
OUTPUTS:
1. Returned by routine, a DATE_INFO structure, containing the
Gregorian proleptic calendar date corresponding to the Julian
Day number input.
NOTES:
1. The algorithm is similar to the FORTRAN subroutine by Henry F.
Fliegel and Thomas C. Van Flandern, CACM, v 11, n 10, OCT 1968,
page 657.
2. This routine assumes a fractional part of zero, meaning noon of
the given date.
3. This routine does not validate the input. It will calculate
Gregorian proleptic calendar dates past the Julian Day zero
point.
4. This routine is EXACTLY the same routine as the one in this series
named 'JD0_to_gregorian ()', which is used as a utility by the
'JD0_to_date ()' routine for Gregorian era dates only.
This routine is duplicated here under a new name solely for the
purpose of providing a complete set of proleptic calendar routines
within the scope of "scdtl_6.h", so that proleptic calendar
applications can use ONE header file for all relevant routines.
*/
|
|
|
|
|
|
|
|