OpenHours.TimeSlot (open_hours v0.1.2)
View SourceThis module contains all functions to work with time slots.
Summary
Functions
Calculates a list of time slots between two dates based on a Schedule. It follows the same rules
as OpenHours.Schedule.in_hours?/2
.
Types
@type t() :: %OpenHours.TimeSlot{ends_at: DateTime.t(), starts_at: DateTime.t()}
Struct composed by a start datetime and an end datetime.
Functions
@spec between(OpenHours.Schedule.t(), DateTime.t(), DateTime.t()) :: [t()]
Calculates a list of time slots between two dates based on a Schedule. It follows the same rules
as OpenHours.Schedule.in_hours?/2
.