diff options
author | Jim Meyering <jim@meyering.net> | 1995-06-07 18:10:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-06-07 18:10:17 +0000 |
commit | a2e52e58b1992bdbf956739fb1599a1265a2edc6 (patch) | |
tree | 1058c5ab205e1c2a4ccc8f26d432decc9b666b5d | |
parent | 85bf8c2e1c017936d7f311f65c5c0fcae12c65f9 (diff) | |
download | coreutils-a2e52e58b1992bdbf956739fb1599a1265a2edc6.tar.xz |
(Convert): Use 2037 as threshold, not 1999.
Otherwise years after 1999 are treated as invalid.
From Andreas Schwab.
-rw-r--r-- | lib/getdate.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getdate.y b/lib/getdate.y index 78d3a75da..b2c523e38 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -616,7 +616,7 @@ Convert (Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) Year += 1900; DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 29 : 28; - if (Year < EPOCH || Year > 1999 + if (Year < EPOCH || Year > 2037 || Month < 1 || Month > 12 /* Lint fluff: "conversion from long may lose accuracy" */ || Day < 1 || Day > DaysInMonth[(int)--Month]) |