Returns the no of days since Monday, 24th November, 4714 B.C. in the
proleptic Gregorian calendar (which is 24th November, -4713 using
'Astronomical' year numbering, and 1st January, 4713 B.C. in the
proleptic Julian calendar). This is also the first day of the 'Julian
Period' proposed by Joseph Scaliger in 1583, and the number of days
since this date is known as the 'Julian Day'. (It is not directly
to do with the Julian calendar, although this is where the name
is derived from.)
The algorithm is valid for all years (positive and negative), and
also for years preceding 4714 B.C.
Algorithm is from PEAR::Date_Calc