OpenHours.TimeSlot (open_hours v0.1.2)

View Source

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

t()

@type t() :: %OpenHours.TimeSlot{ends_at: DateTime.t(), starts_at: DateTime.t()}

Struct composed by a start datetime and an end datetime.

Functions

between(schedule, starts_at, ends_at)

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