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 /walk.h | |
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 'walk.h')
-rw-r--r-- | walk.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -98,7 +98,7 @@ struct xact_xdata_t : public noncopyable value_t value; unsigned int index; unsigned short dflags; - datetime_t date; + date_t date; account_t * account; void * ptr; xacts_list * component_xacts; @@ -609,13 +609,13 @@ public: virtual void flush() { if (last_xact) { - output_diff(current_moment); + output_diff(current_date); last_xact = NULL; } item_handler<xact_t>::flush(); } - void output_diff(const datetime_t& current); + void output_diff(const date_t& current); virtual void operator()(xact_t& xact); }; @@ -661,8 +661,8 @@ protected: std::list<xact_t> xact_temps; public: - datetime_t start; - datetime_t finish; + date_t start; + date_t finish; subtotal_xacts(xact_handler_ptr handler, bool _remember_components = false) @@ -715,7 +715,7 @@ public: TRACE_DTOR(interval_xacts); } - void report_subtotal(const datetime_t& moment = datetime_t()); + void report_subtotal(const date_t& moment = date_t()); virtual void flush() { if (last_xact) @@ -807,7 +807,7 @@ public: virtual void flush(); virtual void operator()(xact_t& xact) { - days_of_the_week[xact.date().date().day_of_week()].push_back(&xact); + days_of_the_week[xact.date().day_of_week()].push_back(&xact); } }; @@ -860,7 +860,7 @@ public: TRACE_DTOR(budget_xacts); } - void report_budget_items(const datetime_t& moment); + void report_budget_items(const date_t& date); virtual void operator()(xact_t& xact); }; |