[snip - some algorithms]

[EMAIL PROTECTED] wrote:
>That appears to be a Julian day referenced to the start of the year.  My
>understanding of a Julian day number is that it is the number of days since
>the start of the current Julian period, which started noon Jan 1 4713 BC.

That's what a Julian date is in the real world :)
As a computer term, a Julian date is any date calculated in the same
manner as a real world Julian date, but possibly from a different base
date. Whatever the base date is, that's called the epoch. The epoch
for Unix is 1-Jan-1970, for DOS it's 1-Jan-1980. There are problems
similar to Y2K when Julian date counters overflow or roll over.

>Noon of Dec 31 1998 was the beginning of JD  2,451,179.  There is an
>algorithm for calculating this number from a given date in the Gregorian
>Calendar, our present calendar, but I don't have it at hand.  It requires
>the use of a floor or ceiling function, the nearest integer smaller (or
>greater) than a given decimal number.  The formula accounts for leap years
>and the days in each month.  It also starts a year on March 1, so February
>is the last month, and the formula truncates its length correctly.  I
>implemented the formula in Forth using integers, but it was long ago -- .

I don't know about anyone else here, but I'd be interested in seeing
that algorithm if you could dig it up, even in Forth :)

Brian

Reply via email to