Skip to content

Commit

Permalink
parse_date(): fix parsing 03/10/2006
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Apr 5, 2006
1 parent 72fdfb5 commit fa0cdab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions date.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ static int match_multi_number(unsigned long num, char c, const char *date, char
break;
}
/* mm/dd/yy ? */
if (is_date(num3, num2, num, tm))
if (is_date(num3, num, num2, tm))
break;
/* dd/mm/yy ? */
if (is_date(num3, num, num2, tm))
if (is_date(num3, num2, num, tm))
break;
return 0;
}
Expand Down

0 comments on commit fa0cdab

Please sign in to comment.