Calendar v0.13.1 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 :: %Calendar.DateTime.Interval{from: %Calendar.DateTime{abbr: term, day: term, hour: term, min: term, month: term, sec: term, std_off: term, timezone: term, usec: term, utc_off: term, year: term}, to: %Calendar.DateTime{abbr: term, day: term, hour: term, min: term, month: term, sec: term, std_off: term, timezone: term, usec: term, utc_off: term, year: term}}

Functions

includes?(interval, datetime)

Specs

includes?(t, %Calendar.DateTime{abbr: term, day: term, hour: term, min: term, month: term, sec: term, std_off: term, timezone: term, usec: term, utc_off: term, year: 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.