Handle two-digit years with leading zeros correctly.
authorJim Meyering <jim@meyering.net>
Tue, 22 Feb 2000 20:16:07 +0000 (20:16 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 22 Feb 2000 20:16:07 +0000 (20:16 +0000)
commit22e6c88ae62dc06d958561f8c818567e24b7c6ca
treef14e61307dea9ab181d5283cf84c07c00670d883
parentc1d4b7c5b17e5c12055a5438c8052284e0b1d91d
Handle two-digit years with leading zeros correctly.
(textint): New typedef.
(parser_control): Member year changed from int to textint.
All uses changed.
(YYSTYPE): Removed; replaced by %union with int and textint members.
(tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
(tSNUMBER, tUNUMBER): Now of type <textintval>.
(date, number, to_year): Use width of number in digits, not its value,
to determine whether it's a 2-digit year, or a 2-digit time.
(yylex): Store number of digits of numeric tokens.
Reported by John Kendall.

(parser_control): Changed from struct parser_control to typedef (for
consistency).  All uses changed.

(tID): Removed; not used.
(yylex): Return '?' for unknown identifiers, rather than (unused) tID.
lib/getdate.y