Board index » delphi » Converting julian date to normal date

Converting julian date to normal date

Quote
Eric Demers wrote:
> I'm looking for a way to convert julian date to normal date back and
> forth (in delphi preferably)

Delphi uses the Julian calendar as far as I know. If you want the Julian
day number, I don't have a reference date, but you can get contiguous
numbers for each day: Trunc(ADate)

--
Bent Tranberg, Agder College, Grimstad
Grooseveien 36, 4890 Grimstad, Norway
e-mail: Bent.Tranb...@hia.no Web: http://www.hia.no

 

Re:Converting julian date to normal date


In article <31443596.6...@hia.no>, Bent Tranberg <Bent.Tranb...@hia.no>
writes
Quote

>Delphi uses the Julian calendar as far as I know. If you want the Julian
>day number, I don't have a reference date, but you can get contiguous
>numbers for each day: Trunc(ADate)

Sorry, but I think Delphi uses the Gregorian calendar. The Julian
calendar allows for a leap year every 4 years including _all_ the years
ending in 00. The Gregorian calendar calls for a leap year every four
years, but has a leap year in only one in four of the end-century years
ending in 00. In other words there is a 3 day difference between the two
calendars every 400 years. If you check the IsLeapYear function in the
VCL code (or CWG page 107) you will see that it is Gregorian, and
applies Pope Gregory XIII's rules a good 1500 years before he was born.
:)
--
Barney Tyrwhitt-Drake

Other Threads