View Source OpenHours.TimeSlot (open_hours v0.1.1)

This module contains all functions to work with time slots.

Summary

Types

t()

Struct composed by a start datetime and an end datetime.

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

Link to this function

between(schedule, starts_at, ends_at)

View Source
@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.