From a05353e26928464b485767cc843ec5b3d9e47040 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 15 Mar 2009 01:14:13 -0400 Subject: First iteration of the new date_interval_t rewrite --- src/token.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index b7c19ceb..fde6a0e3 100644 --- a/src/token.cc +++ b/src/token.cc @@ -205,9 +205,12 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) in.get(c); length++; - interval_t timespan(buf); + date_interval_t timespan(buf); + if (! timespan) + throw_(parse_error, + _("Date specifier does not refer to a starting date")); kind = VALUE; - value = timespan.first(); + value = *timespan.start; break; } -- cgit v1.2.3