Represents a recurring availability window or a date-specific override.
Used to define when time slots are bookable (business hours, working hours, provider availability, etc.).
Recurring availability (day-of-week based)
# Monday through Friday, 9am to 5pm
%PhoenixLiveCalendar.Availability{
days_of_week: [1, 2, 3, 4, 5],
start_time: ~T[09:00:00],
end_time: ~T[17:00:00]
}Date-specific override
# Special hours on a specific date
%PhoenixLiveCalendar.Availability{
date: ~D[2026-04-15],
start_time: ~T[10:00:00],
end_time: ~T[14:00:00]
}
# Block out a specific date entirely
%PhoenixLiveCalendar.Availability{
date: ~D[2026-04-20],
start_time: ~T[00:00:00],
end_time: ~T[23:59:59],
available: false
}Per-resource availability
# Dr. Smith is available Mon/Wed/Fri mornings
%PhoenixLiveCalendar.Availability{
days_of_week: [1, 3, 5],
start_time: ~T[08:00:00],
end_time: ~T[12:00:00],
resource_id: "dr-smith"
}Day numbering
Days of week use ISO numbering: 1 = Monday, 7 = Sunday.
Summary
Functions
Returns whether this availability applies on the given date.
Returns whether the given time falls within this availability window.
Returns the effective availability windows for a given date from a list of availabilities.
Types
Functions
Returns whether this availability applies on the given date.
Date-specific overrides match by exact date. Recurring availability matches by day of week.
Returns whether the given time falls within this availability window.
Returns the effective availability windows for a given date from a list of availabilities.
Date-specific overrides take precedence over recurring day-of-week patterns. Returns only the windows that apply, sorted by start time.