Cocktail v0.5.0 Cocktail.Builder.String View Source
Build human readable strings from schedules.
This module exposes functions for building human readable string
represenations of schedules. It currently only represents the recurrence rules
of a schedule, and doesn’t indicate the start time, duration, nor any
recurrence times or exception times. This is mainly useful for quick glances
at schedules in IEx sessions (because it’s used for the inspect
implementation) and for simple doctests.
Link to this section Summary
Functions
Builds a human readable string represenation of a Cocktail.Schedule.t/0
Link to this section Functions
Builds a human readable string represenation of a Cocktail.Schedule.t/0
.
Examples
iex> alias Cocktail.Schedule
...> schedule = Schedule.new(~N[2017-01-01 06:00:00])
...> schedule = Schedule.add_recurrence_rule(schedule, :daily, interval: 2, hours: [10, 12])
...> build(schedule)
"Every 2 days on the 10th and 12th hours of the day"