+2008-03-06 Ben Pfaff <blp@gnu.org>
+
+ * format-guesser.c (syntax): Require month names to be spelled out
+ as English words, so that single characters that happen to be
+ Roman numerals don't get detected as months. Thanks to John
+ Darrington for reporting this bug.
+
2008-03-04 Ben Pfaff <blp@gnu.org>
Patch #6441. Reviewed by John Darrington.
/* www */
{ FMT_WKDAY, 1, {DT_WEEKDAY} },
- /* mmm */
- { FMT_MONTH, 1, {DT_MONTH} },
+ /* mmm
+
+ We require a spelled-out English month so that
+ single-character Roman numerals like "i" and "x" don't get
+ detected as months. The latter is particularly common in
+ the password field of /etc/passwd-like files. */
+ { FMT_MONTH, 1, {DT_ENGLISH_MONTH} },
};
/* Number of recognized date syntax formats. */
# Date and time formats.
"01-OCT-1978" => DATE11
+"01-x-1978" => EDATE9 # Roman numeral for month.
"01-13-99" => ADATE8
"1-13-99" => ADATE7 (ADATE8)
"13-01-99" => EDATE8
"jan" => MONTH3
"Feb" => MONTH3
"MAR" => MONTH3
-"i" => MONTH1 (MONTH3)
-"ii" => MONTH2 (MONTH3)
-"iii" => MONTH3
-"iiii" => A4
-"iv" => MONTH2 (MONTH3)
-"v" => MONTH1 (MONTH3)
-"vi" => MONTH2 (MONTH3)
-"vii" => MONTH3
-"viii" => MONTH4
-"ix" => MONTH2 (MONTH3)
-"viiii" => A5
-"x" => MONTH1 (MONTH3)
-"xi" => MONTH2 (MONTH3)
-"xii" => MONTH3
+"i" => A1 # Not detected as MONTH format.
+"v" => A1
+"ix" => A2
+"x" => A1
"january" => MONTH7
"janaury" => MONTH7
"february" => MONTH8