summaryrefslogtreecommitdiff
path: root/src/post.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/post.cc')
-rw-r--r--src/post.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/post.cc b/src/post.cc
index 34284e1b..5b9d2bb3 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -97,6 +97,18 @@ date_t post_t::date() const
return *_date;
}
+date_t post_t::actual_date() const
+{
+ if (xdata_ && is_valid(xdata_->date))
+ return xdata_->date;
+
+ if (! _date) {
+ assert(xact);
+ return xact->date();
+ }
+ return *_date;
+}
+
optional<date_t> post_t::effective_date() const
{
optional<date_t> date = item_t::effective_date();