From 6adc5e751838c182a42fda68a7bcaeb85bd3115b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 15 Apr 2005 22:06:37 +0000 Subject: (quick_parse_date): [1178218] Fixed date problem by avoiding an optimization that was being used before for the sake of the textual parser. --- datetime.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datetime.cc b/datetime.cc index 685939aa..591ba8ee 100644 --- a/datetime.cc +++ b/datetime.cc @@ -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 -- cgit v1.2.3