git-merge-tree: generalize the "traverse <n> trees in sync" functionality
[gitweb.git] / date.c
diff --git a/date.c b/date.c
index 3ede02777b9740df6ef0ecc55da6456c7912758f..416ea579a3eb1dbc910817413f995556ad115b29 100644 (file)
--- a/date.c
+++ b/date.c
@@ -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);
 }