vobject v0.1.0 ICalendar.RRULE View Source
Serialize and deserialize RRULEs
Link to this section Summary
Functions
Produce inverse of @string_to_atom_keys at compile time
Produce inverse of @days at compile time
Produce inverse of @frequencies at compile time
Produces a list of valid RRULE days and their %ICalendar.RRULE{} counterparts
This function is used to deserialize an RRULE string into a struct
Produces a list of valid RRULE frequencies and their %ICalendar.RRULE{} counterparts
Produces a list of months in the year
This function is used to split up values into a list format. An operation is optionally passed to it to format each result in a certain way
Produces a list of RRULE iCal String keys and their %ICalendar.RRULE{} counterparts
This function is used to determine whether an RRULE struct has errors or not
Link to this section Functions
Produce inverse of @string_to_atom_keys at compile time
Produce inverse of @days at compile time
Produce inverse of @frequencies at compile time
Produces a list of valid RRULE days and their %ICalendar.RRULE{} counterparts.
This function is used to deserialize an RRULE string into a struct
Sending an RRULE deserializes it:
iex> "FREQ=DAILY;COUNT=10"
...> |> ICalendar.RRULE.deserialize
{:ok,
%ICalendar.RRULE{
:frequency => :daily,
:count => 10
}}
Sending a bad RRULE produces an error:
iex> "COUNT=1;UNTIL=20151224T083000"
...> |> ICalendar.RRULE.deserialize
{:error, ["You can only set UNTIL or COUNT: not both at the same time"]}
Produces a list of valid RRULE frequencies and their %ICalendar.RRULE{} counterparts.
Produces a list of months in the year
This function is used to split up values into a list format. An operation is optionally passed to it to format each result in a certain way.
iex> RRULE.parse_value_as_list("a,b,c")
["a", "b", "c"]
iex> RRULE.parse_value_as_list("1,2,3", &String.to_integer/1)
[1,2,3]
Produces a list of RRULE iCal String keys and their %ICalendar.RRULE{} counterparts.
This function is used to determine whether an RRULE struct has errors or not
iex> ICalendar.RRULE.valid(%ICalendar.RRULE{errors: []})
true
iex> ICalendar.RRULE.valid(%ICalendar.RRULE{errors: ["error"]})
false