/*
* 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".
}
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);
}