Commits

Anonymous committed fa0cdab

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>

  • Participants
  • Parent commits 72fdfb5

Comments (0)

Files changed (1)

 				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;
 	}