summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/token.cc')
-rw-r--r--src/token.cc7
1 files changed, 5 insertions, 2 deletions
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;
}