From 585b3a246d51ce50d3085d406079bc63588673dd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 15 Mar 2009 04:03:17 -0400 Subject: Added feature to "align" the interval's start date --- src/times.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/times.h') diff --git a/src/times.h b/src/times.h index 3ed3621d..eb58a97f 100644 --- a/src/times.h +++ b/src/times.h @@ -138,6 +138,7 @@ public: const duration_t& duration); optional start; + bool aligned; optional skip_duration; std::size_t factor; optional next; @@ -145,10 +146,10 @@ public: optional end_of_duration; optional end; - explicit date_interval_t() : factor(1) { + explicit date_interval_t() : aligned(false), factor(1) { TRACE_CTOR(date_interval_t, ""); } - date_interval_t(const string& str) : factor(1) { + date_interval_t(const string& str) : aligned(false), factor(1) { TRACE_CTOR(date_interval_t, "const string&"); parse(str); } @@ -182,6 +183,9 @@ public: parse(in); } + void resolve_end(); + void stabilize(const optional& date = none); + bool is_valid() const { return start; } -- cgit v1.2.3