Skip to content

Commit fa0cdab

Browse files
author
Junio C Hamano
committed
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>
1 parent 72fdfb5 commit fa0cdab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ static int match_multi_number(unsigned long num, char c, const char *date, char
257257
break;
258258
}
259259
/* mm/dd/yy ? */
260-
if (is_date(num3, num2, num, tm))
260+
if (is_date(num3, num, num2, tm))
261261
break;
262262
/* dd/mm/yy ? */
263-
if (is_date(num3, num, num2, tm))
263+
if (is_date(num3, num2, num, tm))
264264
break;
265265
return 0;
266266
}

0 commit comments

Comments
 (0)