diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-28 01:37:29 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-28 01:37:29 -0600 |
commit | 887f429ae40934c145e03b03cc452e6af4457c0f (patch) | |
tree | c021ea1b6b67b0d866d67d114a7ce68ffdb00532 /src/times.cc | |
parent | d3d13329d98b2b26378813a91ad0d4e49045a426 (diff) | |
download | fork-ledger-887f429ae40934c145e03b03cc452e6af4457c0f.tar.gz fork-ledger-887f429ae40934c145e03b03cc452e6af4457c0f.tar.bz2 fork-ledger-887f429ae40934c145e03b03cc452e6af4457c0f.zip |
Added debug code for debugging interval reports
Diffstat (limited to 'src/times.cc')
-rw-r--r-- | src/times.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/times.cc b/src/times.cc index 0384edf6..dd10a508 100644 --- a/src/times.cc +++ b/src/times.cc @@ -1397,8 +1397,17 @@ bool date_interval_t::find_period(const date_t& date) DEBUG("times.interval", "date = " << date); DEBUG("times.interval", "scan = " << scan); DEBUG("times.interval", "end_of_scan = " << end_of_scan); +#if defined(DEBUG_ON) + if (finish) + DEBUG("times.interval", "finish = " << *finish); + else + DEBUG("times.interval", "finish is not set"); +#endif while (date >= scan && (! finish || scan < *finish)) { + DEBUG("times.interval", "date = " << date); + DEBUG("times.interval", "end_of_scan = " << end_of_scan); + if (date < end_of_scan) { start = scan; end_of_duration = end_of_scan; @@ -1416,6 +1425,8 @@ bool date_interval_t::find_period(const date_t& date) end_of_scan = duration->add(scan); } + DEBUG("times.interval", "false: failed scan"); + return false; } |