Fix for date parsing when no year is given

This commit is contained in:
John Wiegley 2010-01-16 21:12:13 -05:00
parent 2919710a82
commit d176abf625

View file

@ -224,7 +224,7 @@ namespace {
when = date_t(year ? *year : CURRENT_DATE().year(),
when.month(), when.day());
if (when.month() > CURRENT_DATE().month())
if (! year && when.month() > CURRENT_DATE().month())
when -= gregorian::years(1);
}
}