Gregorian and julian calendar

delphimoon

Gregorian and julian calendar functions

Altorithms

Top  Previous  Next

 

Conversion of calendar dates to julian date and back

 

function Calc_Julian_date_julian(year,month,day:word): extended;

function Calc_Julian_date_gregorian(year,month,day:word): extended;

function Calc_Julian_date_switch(year,month,day:word; switch_date:extended): extended;

function Calc_Julian_date(year,month,day:word): extended;

procedure Calc_Calandar_date_julian(juldat:extended; var year,month,day:word);

procedure Calc_Calendar_date_gregorian(juldat:extended; var year,month,day:word);

procedure Calc_Calendar_date_switch(juldat:extended; var year,month,day:word; switch_date:extended);

procedure Calc_Calendar_date(juldat:extended; var year,month,day:word);

 

Description

These functions are used to convert a calendar date to a julian date and back. They are both available for the gregorian calendar, and the julian calendar which was used before. Those functions containing the switch parameter are a combination of both, the parameter switch is the julian date of the first day of the gregorian calendar.

Calc_Calencar_date and Calc_Julian_date are shortcuts which use the standard switching day, October 15th 1582. This is also predefined as a constant calendar_change_standard.