diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-01 17:37:22 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-01 17:37:22 -0400 |
commit | 858978de8931ce5c98882472b10051f4e57dd029 (patch) | |
tree | 2da6d0d78cc223b9f60c3161951b3b67bd1ccd4a /report.cc | |
parent | ea3b386062e62379c546239f2e95cb1e11c56d23 (diff) | |
download | fork-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.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |