Fix approxidate() to understand 12:34 AM/PM are 00:34 and 12:34
authorLinus Torvalds <torvalds@osdl.org>
Fri, 29 Sep 2006 19:36:13 +0000 (12:36 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 29 Sep 2006 20:04:09 +0000 (13:04 -0700)
It just simplifies the whole thing to say

"hour = (hour % 12) + X"

where X is 12 for PM and 0 for AM.

It also fixes the "exact date" parsing, which didn't parse AM at all, and
as such would do the same "12:30 AM" means "12:30 24-hour-format" bug. Of
course, I hope that no exact dates use AM/PM anyway, but since we support
the PM format, let's just get it right.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
No differences found