Name:  Lawrence Hixson
UserID:  aquacade
 
I'd like to contribute a module for Julian Day (JD) number to/from conversions that are absolutely accurate from 1/1/9999 BC to 12/31/9999 AD to the second (perhaps a wider range of years if my testing proves the routines reliable).
 
My module differs from other CPAN contributions in that it:
 
1) Assumes our current 7-day week as a continuous series of days from ancient to future, completely incorporating full rules of leap years as though leap year rules existed across the range of all years as well.
 
2) It uses fractional part of number to encode time of day to the second
 
3) Uses 12:00:00 UTC as it's change of day as per it's intended purpose (astronomical observations done during night so midnight is JD fraction .5
 
4) JD 0 is 1/1/4713 BC  12:00:00 UTC
 
5) For ease of use I assume that non-existent year zero is treated as 1 BC and the Gregorian shift is handled seemlessly by forcing all the days from 5-OCT-1582 to 14-OCT-1582 to JD 2299161 to maintain unbroken 7-day weeks
 
6) Day-of-the-week function included due to 12:00:00 UTC bias as $dow=abs(floor($jd+.5)) % 7
 
7) Day-of-the-year function also included.
 
I will probably include a few other date/time related function (not parsing) as yet to be determined.
 
Thanks!

Reply via email to