Skip to content

Commit

Permalink
Remove more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Sep 19, 2024
1 parent 65c8440 commit 6483741
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/iso8601/unit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ defmodule Tempo.Iso8601.Unit do
}

@unit_after %{
year: {:month, 1..-1},
month: {:day, 1..-1},
year: {:month, 1..-1//-1},
month: {:day, 1..-1//-1},
week: {:day_of_week, 1..7},
day: {:hour, 0..23},
hour: {:minute, 0..59},
Expand Down Expand Up @@ -54,10 +54,10 @@ defmodule Tempo.Iso8601.Unit do
"""
def implicit_enumerator(:year = unit, calendar) do
if calendar.calendar_base == :month do
if calendar.calendar_base() == :month do
Map.get(@unit_after, unit)
else
{:week, 1..-1}
{:week, 1..-1//-1}
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/validation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ defmodule Tempo.Validation do

with {:ok, week} <- conform(week, 1..weeks_in_year),
[day_of_week: day] <- resolve([day_of_week: day], calendar) do
year_week_day(year, week, day, rest, calendar.calendar_base, calendar)
year_week_day(year, week, day, rest, calendar.calendar_base(), calendar)
end
end

Expand Down

0 comments on commit 6483741

Please sign in to comment.