diff options
author | Junio C Hamano <junkio@cox.net> | 2006-01-05 20:52:50 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-05 20:52:50 -0800 |
commit | 92e802c6ccb96d1b5e8561b0a136d43d82253293 (patch) | |
tree | 9b6c265d69d1dc8bcce36c86a44674cfb010a6d7 /date.c | |
parent | 17dff84b5e745ba17a5b3ae5591d79f96b165d48 (diff) | |
parent | c1fe2fe4fe685e0587c3949f953aab726de88994 (diff) | |
download | git-1.0.7.tar.gz |
GIT 1.0.7v1.0.7
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -326,7 +326,7 @@ static int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt /* * NOTE! We will give precedence to day-of-month over month or - * year numebers in the 1-12 range. So 05 is always "mday 5", + * year numbers in the 1-12 range. So 05 is always "mday 5", * unless we already have a mday.. * * IOW, 01 Apr 05 parses as "April 1st, 2005". @@ -640,7 +640,7 @@ unsigned long approxidate(const char *date) } if (number > 0 && number < 32) tm.tm_mday = number; - if (tm.tm_mon > now.tm_mon) + if (tm.tm_mon > now.tm_mon && tm.tm_year == now.tm_year) tm.tm_year--; return mktime(&tm); } |