(quick_parse_date): [1178218] Fixed date problem by avoiding an

optimization that was being used before for the sake of the textual
parser.
This commit is contained in:
John Wiegley 2005-04-15 22:06:37 +00:00
parent 18881e9a51
commit 6adc5e7518

View file

@ -307,6 +307,9 @@ bool parse_date(const char * date_str, std::time_t * result, const int year)
bool quick_parse_date(const char * date_str, std::time_t * result)
{
#if 1
return parse_date(date_str, result, now_year);
#else
int year = -1, month = -1, day, num = 0;
for (const char * p = date_str; *p; p++) {
@ -358,6 +361,7 @@ bool quick_parse_date(const char * date_str, std::time_t * result)
*result += day * 24 * 60 * 60;
return true;
#endif
}
} // namespace ledger