(tMONTH_UNIT): Increase yyRelMonth by $1, not just by 1.
authorJim Meyering <jim@meyering.net>
Sat, 22 Feb 1997 20:13:19 +0000 (20:13 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 22 Feb 1997 20:13:19 +0000 (20:13 +0000)
(tDAY_UNIT): Likewise for yyRelDay.
(tHOUR_UNIT): Likewise for yyRelHour.
(tMINUTE_UNIT): Likewise for yyRelMinutes.
(tSEC_UNIT): Likewise for yyRelSeconds.

lib/getdate.y

index d33fa06..f63bebf 100644 (file)
@@ -356,7 +356,7 @@ relunit     : tUNUMBER tYEAR_UNIT {
            yyRelMonth += $1 * $2;
        }
        | tMONTH_UNIT {
-           yyRelMonth++;
+           yyRelMonth += $1;
        }
        | tUNUMBER tDAY_UNIT {
            yyRelDay += $1 * $2;
@@ -365,7 +365,7 @@ relunit     : tUNUMBER tYEAR_UNIT {
            yyRelDay += $1 * $2;
        }
        | tDAY_UNIT {
-           yyRelDay++;
+           yyRelDay += $1;
        }
        | tUNUMBER tHOUR_UNIT {
            yyRelHour += $1 * $2;
@@ -374,7 +374,7 @@ relunit     : tUNUMBER tYEAR_UNIT {
            yyRelHour += $1 * $2;
        }
        | tHOUR_UNIT {
-           yyRelHour++;
+           yyRelHour += $1;
        }
        | tUNUMBER tMINUTE_UNIT {
            yyRelMinutes += $1 * $2;
@@ -383,7 +383,7 @@ relunit     : tUNUMBER tYEAR_UNIT {
            yyRelMinutes += $1 * $2;
        }
        | tMINUTE_UNIT {
-           yyRelMinutes++;
+           yyRelMinutes += $1;
        }
        | tUNUMBER tSEC_UNIT {
            yyRelSeconds += $1 * $2;
@@ -392,7 +392,7 @@ relunit     : tUNUMBER tYEAR_UNIT {
            yyRelSeconds += $1 * $2;
        }
        | tSEC_UNIT {
-           yyRelSeconds++;
+           yyRelSeconds += $1;
        }
        ;