X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetdate.y;h=ce119056a1116e8de0837ab9bbe1d57d8cfb1c9f;hb=ad77a609ccd84b0650cbdc0cda015456c28ce5d7;hp=78d3a75dad338ac673161bf034abcaab9e50a17c;hpb=a5ebad6e40c4d4d2fa3034c66bea5007d6c73dc8;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index 78d3a75da..ce119056a 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -242,7 +242,7 @@ day : tDAY { yyDayOrdinal = 1; yyDayNumber = $1; } - | tUNUMBER tDAY { + | tUNUMBER tDAY { /* FIXME */ yyDayOrdinal = $1; yyDayNumber = $2; } @@ -279,6 +279,7 @@ date : tUNUMBER '/' tUNUMBER { yyYear = $4; } | tUNUMBER tMONTH { + /* FIXME: `date -d 'next october'' is interpreted as 2 october. */ yyMonth = $2; yyDay = $1; } @@ -314,10 +315,10 @@ relunit : tUNUMBER tMINUTE_UNIT { | tSEC_UNIT { yyRelSeconds++; } - | tSNUMBER tMONTH_UNIT { + | tSNUMBER tMONTH_UNIT { /* FIXME */ yyRelMonth += $1 * $2; } - | tUNUMBER tMONTH_UNIT { + | tUNUMBER tMONTH_UNIT { /* FIXME */ yyRelMonth += $1 * $2; } | tMONTH_UNIT { @@ -616,7 +617,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])