summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-28 01:37:29 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-28 01:37:29 -0600
commit887f429ae40934c145e03b03cc452e6af4457c0f (patch)
treec021ea1b6b67b0d866d67d114a7ce68ffdb00532 /src/times.cc
parentd3d13329d98b2b26378813a91ad0d4e49045a426 (diff)
downloadfork-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.cc11
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;
}