Fix "1 day ago", "yesterday" and similar relative-time phrases

when parsing dates.

PR: bin/104934: bug in some date handling of bsdtar
Reported by: Herve Boulouis
MFC after: 3 days
This commit is contained in:
kientzle 2006-11-02 04:16:15 +00:00
parent 158b60fc3b
commit 2f99905b1f

View File

@ -270,11 +270,11 @@ relunit : '-' tUNUMBER tSEC_UNIT {
}
| tUNUMBER tSEC_UNIT {
/* "1 day" */
yyRelSeconds += $1;
yyRelSeconds += $1 * $2;
}
| tSEC_UNIT {
/* "hour" */
yyRelSeconds++;
yyRelSeconds += $1;
}
| '-' tUNUMBER tMONTH_UNIT {
/* "-3 months" */