Navigation
Synopsis Given an interval, return a list of days.
Function list[datetime] dateRangeByDay(interval i)
Usage import DateTime;
Description Given an interval i, return a list of days [i.begin, ..., i.end].
Examples
rascal>import DateTime;
ok
rascal>B = now();
datetime: $2014-10-28T10:39:41.273+00:00$
rascal>E = incrementDays(B, 2);
datetime: $2014-10-30T10:39:41.273+00:00$
rascal>I = createInterval(B, E);
interval: Interval($2014-10-28T10:39:41.273+00:00$,$2014-10-30T10:39:41.273+00:00$)
rascal>dateRangeByDay(I);
list[datetime]: [2014-10-28,2014-10-29,2014-10-30]
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.