Subject: | Edge case: 12/26/9999 - 12/31/9999 return invalid year on call to UnixDate |
I know this is a total edge case, but I'm working on a system that
tracks data with no end date by using the date 12/31/9999. I'm taking
input as MM/DD/YYYY and using ParseDate and UnixDate to reformat for
storage like this:
UnixDate(ParseDate('12/31/9999'), '%Q');
This generates an error:
ERROR: Invalid year (10000)
at /Library/Perl/5.8.6/Date/Manip.pm line 5507
Date::Manip::Date_FixYear(10000) called at
/Library/Perl/5.8.6/Date/Manip.pm line 3359
Date::Manip::Date_WeekOfYear(1, 7, 10000, 1) called at
/Library/Perl/5.8.6/Date/Manip.pm line 1825
Date::Manip::UnixDate('9999123100:00:00', '%Q') called at
manip.pl line 8
I'm not sure I actually expect this to be fixed, but it seems it ought
to work.