John Peacock wrote:
and at any point in that sequence, allow the user to set the value to undef (for "I don't have any information about anything below this"). All math operations would then stop at the point where either term (for binary operations) contained an undef (hence two disimilarly accurate DT objects would have a result no more accurate than the least accurate term). This would allow reduced precision date math to happen naturally.

DateTime::Incomplete
http://search.cpan.org/dist/DateTime-Incomplete/lib/DateTime/Incomplete.pm

It doesn't handle the "add" methods, but it could do it.
I don't know if it would handle DST correctly. How about writing a test?

- Flavio S. Glock

Reply via email to