Navigation
Synopsis Return the number of days in an interval, including the begin and end days.
Function int daysInInterval(interval i)
Usage import DateTime;
Examples
rascal>import DateTime;
ok
rascal>B = now();
datetime: $2014-02-14T09:30:20.230+01:00$
rascal>E = incrementDays(B, 2);
datetime: $2014-02-16T09:30:20.230+01:00$
rascal>I = createInterval(B, E);
interval: Interval($2014-02-14T09:30:20.230+01:00$,$2014-02-16T09:30:20.230+01:00$)
rascal>daysInInterval(I);
int: 2
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.