summaryrefslogtreecommitdiff
path: root/xact.h
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 /xact.h
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 'xact.h')
-rw-r--r--xact.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/xact.h b/xact.h
index a597876d..d843bd11 100644
--- a/xact.h
+++ b/xact.h
@@ -55,20 +55,20 @@ class xact_t : public supports_flags<>, public scope_t
public:
enum state_t { UNCLEARED, CLEARED, PENDING };
- entry_t * entry;
- state_t state;
- account_t * account;
- optional<datetime_t> _date;
- optional<datetime_t> _date_eff;
- amount_t amount;
- optional<expr_t> amount_expr;
- optional<amount_t> cost;
- optional<expr_t> cost_expr;
- optional<string> note;
- istream_pos_type beg_pos;
- unsigned long beg_line;
- istream_pos_type end_pos;
- unsigned long end_line;
+ entry_t * entry;
+ state_t state;
+ account_t * account;
+ optional<date_t> _date;
+ optional<date_t> _date_eff;
+ amount_t amount;
+ optional<expr_t> amount_expr;
+ optional<amount_t> cost;
+ optional<expr_t> cost_expr;
+ optional<string> note;
+ istream_pos_type beg_pos;
+ unsigned long beg_line;
+ istream_pos_type end_pos;
+ unsigned long end_line;
mutable void * data;
static bool use_effective_date;
@@ -113,9 +113,9 @@ class xact_t : public supports_flags<>, public scope_t
}
~xact_t();
- datetime_t actual_date() const;
- datetime_t effective_date() const;
- datetime_t date() const {
+ date_t actual_date() const;
+ date_t effective_date() const;
+ date_t date() const {
if (use_effective_date)
return effective_date();
else