git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parse_date(): fix parsing 03/10/2006
@ 2006-04-05  6:00 Junio C Hamano
  2006-04-05  6:16 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2006-04-05  6:00 UTC (permalink / raw)
  To: git; +Cc: Andrew Morton, Brown, Len

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>

---
 * Spotted, thanks to Len Brown and Andrew Morton.

 date.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

f5cd7df6e8322a0b783668b31881ab95a5ce33bd
diff --git a/date.c b/date.c
index 416ea57..18a0710 100644
--- a/date.c
+++ b/date.c
@@ -257,10 +257,10 @@ static int match_multi_number(unsigned l
 				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;
 	}
-- 
1.3.0.rc2.g110c

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-14 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05  6:00 [PATCH] parse_date(): fix parsing 03/10/2006 Junio C Hamano
2006-04-05  6:16 ` Andrew Morton
2006-04-05  6:26   ` Junio C Hamano
2006-04-05  6:40     ` Andrew Morton
2006-04-05 22:39     ` [RFC/PATCH] date parsing: be friendlier to our European friends Junio C Hamano
2006-04-05 22:47       ` Sam Ravnborg
2006-04-05 22:54       ` Junio C Hamano
2006-07-14 10:26         ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).