From 64837418cc26fc64750f428cb82c3d624fdc461c Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Thu, 19 Sep 2024 10:02:02 +1000 Subject: [PATCH] Remove more warnings --- lib/iso8601/unit.ex | 8 ++++---- lib/validation.ex | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/iso8601/unit.ex b/lib/iso8601/unit.ex index 0bff437..33467fc 100644 --- a/lib/iso8601/unit.ex +++ b/lib/iso8601/unit.ex @@ -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}, @@ -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 diff --git a/lib/validation.ex b/lib/validation.ex index 439e3a9..42f0ec8 100644 --- a/lib/validation.ex +++ b/lib/validation.ex @@ -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