summaryrefslogtreecommitdiff
path: root/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-01 17:37:22 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-01 17:37:22 -0400
commit858978de8931ce5c98882472b10051f4e57dd029 (patch)
tree2da6d0d78cc223b9f60c3161951b3b67bd1ccd4a /report.cc
parentea3b386062e62379c546239f2e95cb1e11c56d23 (diff)
downloadfork-ledger-858978de8931ce5c98882472b10051f4e57dd029.tar.gz
fork-ledger-858978de8931ce5c98882472b10051f4e57dd029.tar.bz2
fork-ledger-858978de8931ce5c98882472b10051f4e57dd029.zip
Journal data structures now use date_t instead of datetime_t.
This means transactions can only have day-level granularity -- which has always been the case from an data file point of view. The advantage to this restriction is that reports will now be immune from daylight savings related bugs, where a transaction falls to the wrong side of a --monthly report, for example.
Diffstat (limited to 'report.cc')
-rw-r--r--report.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/report.cc b/report.cc
index dd821c22..5b74806a 100644
--- a/report.cc
+++ b/report.cc
@@ -87,9 +87,9 @@ report_t::chain_xact_handlers(xact_handler_ptr base_handler,
// xacts which can be reconciled to a given balance
// (calculated against the xacts which it receives).
if (! reconcile_balance.empty()) {
- datetime_t cutoff = current_moment;
+ date_t cutoff = current_date;
if (! reconcile_date.empty())
- cutoff = parse_datetime(reconcile_date);
+ cutoff = parse_date(reconcile_date);
handler.reset(new reconcile_xacts
(handler, value_t(reconcile_balance), cutoff));
}
@@ -309,7 +309,7 @@ value_t report_t::ftime(call_scope_t& args)
if (args.size() < 1)
throw_(std::logic_error, "usage: ftime(DATE [, DATE_FORMAT])");
- datetime_t date = args[0].as_datetime();
+ date_t date = args[0].as_date();
string date_format;
if (args.size() == 2)