diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-02-10 19:31:37 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-02-10 19:31:37 +0000 |
commit | 660a9e91edc56a0125f26045a71659394f9695dd (patch) | |
tree | c483455379f9b1936a06ce02be447bf0f069796f /gnu/usr.bin/cvs/lib/getdate.y | |
parent | 401a4da8c9d8080c2f81ea0e35cc9e72d12b0382 (diff) |
Integrate local changes
Diffstat (limited to 'gnu/usr.bin/cvs/lib/getdate.y')
-rw-r--r-- | gnu/usr.bin/cvs/lib/getdate.y | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/usr.bin/cvs/lib/getdate.y b/gnu/usr.bin/cvs/lib/getdate.y index b118f7d544e..776323cf4de 100644 --- a/gnu/usr.bin/cvs/lib/getdate.y +++ b/gnu/usr.bin/cvs/lib/getdate.y @@ -281,9 +281,15 @@ date : tUNUMBER '/' tUNUMBER { yyDay = $3; } | tUNUMBER '/' tUNUMBER '/' tUNUMBER { - yyMonth = $1; - yyDay = $3; - yyYear = $5; + if ($1 >= 100) { + yyYear = $1; + yyMonth = $3; + yyDay = $5; + } else { + yyMonth = $1; + yyDay = $3; + yyYear = $5; + } } | tUNUMBER tSNUMBER tSNUMBER { /* ISO 8601 format. yyyy-mm-dd. */ @@ -643,7 +649,9 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) if (Year < 0) Year = -Year; - if (Year < 100) { + if (Year < 69) + Year += 2000; + else if (Year < 100) Year += 1900; if (Year < EPOCH) Year += 100; @@ -960,7 +968,7 @@ get_date(p, now) } tm = localtime(&nowtime); - yyYear = tm->tm_year; + yyYear = tm->tm_year + 1900; yyMonth = tm->tm_mon + 1; yyDay = tm->tm_mday; yyTimezone = now->timezone; |