Yitzchak Scott-Thoennes wrote: > How do you handle the future? Right now we only know the > actual leap seconds through 2002/12/30. But you could make some kind of > prediction for dates beyond that.
Sure, there could be an option, such that it would add 1 second for each 1 1/2 year outside the "known" range. But those would not be "official" leap seconds. This module might need upgrading each 6 or 12 months, since future leap seconds are not predictable (there is some "noise" in earth rotation speed and in the atomic clocks). The user program could check the values of the first/last epoch we know for sure, and schedule a CPAN check when time comes. Current values for first/last known epoch are $Date::Leapsecond::UTC_EPOCH[0] # epoch of 1972-Jan-01 $Date::Leapsecond::UTC_EPOCH[-1] # epoch of 1999-Jan-01 It looks like we need an "expiration date" constant to store the value "2002-12-31" - Flávio