From f1523b5464924bf9d9987fce0cb3dbe4acda5a4b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Mar 2009 03:44:27 -0400 Subject: The new code is working now. --- src/times.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/times.h') diff --git a/src/times.h b/src/times.h index eb58a97f..9750bbfb 100644 --- a/src/times.h +++ b/src/times.h @@ -155,6 +155,7 @@ public: } date_interval_t(const date_interval_t& other) : start(other.start), + aligned(other.aligned), skip_duration(other.skip_duration), factor(other.factor), next(other.next), @@ -193,10 +194,13 @@ public: /** Find the current or next period containing date. Returns true if the date_interval_t object has been altered to reflect the interval containing date, or false if no such period can be found. */ - bool find_period(const date_t& date, date_interval_t * last_interval = NULL); + bool find_period(const date_t& date); - date_t inclusive_end() const { - return *end_of_duration - gregorian::days(1); + optional inclusive_end() const { + if (end_of_duration) + return *end_of_duration - gregorian::days(1); + else + return none; } date_interval_t& operator++(); -- cgit v1.2.3