Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/icalendar/recurrence.ex
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ defmodule ICalendar.Recurrence do
bydays
|> Enum.map(fn byday ->
if byday in @valid_days do
day_atom = byday |> String.downcase() |> String.to_atom()
day_atom = byday |> String.downcase() |> String.to_existing_atom()

# determine the difference between the byday and the event's dtstart
day_offset_for_reference = Map.get(@day_values, day_atom) - Timex.weekday(event.dtstart)
Expand Down
2 changes: 1 addition & 1 deletion lib/icalendar/util/deserialize.ex
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ defmodule ICalendar.Util.Deserialize do
|> Enum.reduce(%{}, fn rule, hash ->
[key, value] = rule |> String.split("=")

case key |> String.downcase() |> String.to_atom() do
case key |> String.downcase() |> String.to_existing_atom() do
:freq ->
hash |> Map.put(:freq, value)

Expand Down