Calendar v0.17.2 Calendar.DateTime.Interval
An Interval
consists of a start and an end DateTime
.
Summary
Functions
Returns true
when the interval contains the given datetime
Types
t()
t() :: %Calendar.DateTime.Interval{from: %DateTime{calendar: term, day: term, hour: term, microsecond: term, minute: term, month: term, second: term, std_offset: term, time_zone: term, utc_offset: term, year: term, zone_abbr: term}, to: %DateTime{calendar: term, day: term, hour: term, microsecond: term, minute: term, month: term, second: term, std_offset: term, time_zone: term, utc_offset: term, year: term, zone_abbr: term}}
Functions
includes?(interval, datetime)
includes?(t, %DateTime{calendar: term, day: term, hour: term, microsecond: term, minute: term, month: term, second: term, std_offset: term, time_zone: term, utc_offset: term, year: term, zone_abbr: term}) :: boolean
Returns true
when the interval contains the given datetime.
“From” and “to” datetimes are treated as inclusive. This means that if the
provided datetime
is between the from
and to
of the interval or equal
to either, true
will be returned.