@matheusbsbs / matheus-bagliano / commits / fa0cdab537
Fork 0

parse_date(): fix parsing 03/10/2006

The comment associated with the date parsing code for three numbers separated with slashes or dashes implied we wanted to interpret using this order: yyyy-mm-dd yyyy-dd-mm mm-dd-yy dd-mm-yy However, the actual code had the last two wrong, and making it prefer dd-mm-yy format over mm-dd-yy. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 4, 2006 at 22:57 UTC fa0cdab537b1ae635b5a64cddd29cddf2dfc4a1b
1 file changed +2 -2
date.c
+2 -2
@@ -257,10 +257,10 @@ static int match_multi_number(unsigned long num, char c, const char *date, char
257 break;
258 }
259 /* mm/dd/yy ? */
260 - if (is_date(num3, num2, num, tm))
260 + if (is_date(num3, num, num2, tm))
261 break;
262 /* dd/mm/yy ? */
263 - if (is_date(num3, num, num2, tm))
263 + if (is_date(num3, num2, num, tm))
264 break;
265 return 0;
266 }