|
|
|
|
|
|
|
7.7 gregorian_to_julian () |
|
|
|
|
|
|
|
|
The routine greg2jul.c (Listing 7.6) converts a proleptic Gregorian calendar date into the corresponding proleptic Julian calendar date. |
|
|
|
|
|
|
|
|
7.8
Notes on the Conversion of Gregorian to Julian Dates |
|
|
|
|
|
|
|
|
This section briefly discusses the mathematics behind the conversion of Gregorian to Julian dates and presents a table showing the number of days of discrepancy between the two calendars for several millennia (Table 7.1). |
|
|
|
|
|
|
|
|
In the following discussion and table, the term ''century" refers to the 100-year period of dates reckoned by the Gregorian calendar rule, ending on 28 February of the century year multiplied by 100. |
|
|
|
|
|
|
|
|
The term "error" is the number of days that must be added to a date within the date range to convert the Gregorian date to the corresponding Julian calendar date. |
|
|
|
|
| Listing 7.6 | |
|
|
|
|
2. This conversion does NOT allow a date designated as 'New Style'
(N.S.) to be converted to a new 'Old Style' date, in those situations
where the 'first of year' convention was also changed when the
Gregorian calendar was adopted. E.g., in the former British
possessions, including America, the first of the year was changed
from March to January at the time of the adoption of the Gregorian
calendar. Also note that different countries adopted the Gregorian
calendar at different dates.
3. This routine does not validate the input. To validate Gregorian
dates, use the routine in this series 'valid_date_gregorian ()'.
*/
#include "scdtl_6.h"
struct DATE_INFO gregorian_to_julian (struct DATE_INFO *gdate)
{
double jd;
struct DATE_INFO jdate;
jd = gregorian_proleptic_to_JD0 (gdate);
jdate = JD0_to_julian_proleptic (jd);
return (jdate);
}
|
|
|
|
|
|
|
|