ez_calendar v0.1.4 EZCalendar.Calendar behaviour

Behaviour definition for calendar types.

Summary

Callbacks

Accepts the merged calendar dates and the date from the original repo function call params arg

Accepts a date erl and returns a 2 item Date type tuple representing the start and end date for the calendar

Types

calendar()
calendar :: struct
date()
dates()
dates :: list

Callbacks

build(dates, date)
build(dates, date) :: [calendar]

Accepts the merged calendar dates and the date from the original repo function call params arg.

Returns a calendar struct should include the following fields:

:title - a string defining the date range

:dates - the list of merged calendar dates

:params - a param map for the current date period

:next - a param map for the next date period

:prev - a param map for the previous date period

date_range(date)
date_range(date) :: [tuple]

Accepts a date erl and returns a 2 item Date type tuple representing the start and end date for the calendar.