Returned date belongs to the proleptic Gregorian calendar, using
'Astronomical' year numbering.
The algorithm is valid for all years (positive and negative), and
also for years preceding 4714 B.C. (i.e. for negative 'Julian Days'),
and so the only limitation is platform-dependent (for 32-bit systems
the maximum year would be something like about 1,465,190 A.D.).
N.B. Monday, 24th November, 4714 B.C. is Julian Day '0'.
Algorithm is from PEAR::Date_Calc