elixir-cldr / cldr_calendars

Calendar functions for CLDR
Other
15 stars 6 forks source link

Spec for `Calendar.localize/2` and `Calendar.localize/3` are conflicting #15

Closed alappe closed 9 months ago

alappe commented 1 year ago

Hello Kip,

I'm using Cldr.Calendar.localize(month.first, :month) and dialyzer complains:

The function call will not succeed.

Cldr.Calendar.localize(any(), :month)

breaks the contract
(Date.t(), Keyword.t()) ::
  {:ok, Date.t()} | {:error, :incompatible_calendars} | {:error, {module(), String.t()}}

I'm not sure how to solve this. For now, I pass [] as the third argument to make it clear which function is used. Wanted to report it though…

Thanks for your efforts! Andreas

kipcole9 commented 9 months ago

My sincere apologies for how long this has taken to fix. In truth, I lose track of this issue still being open. I need to find a way to get a daily feed of open issues on my repos.

I've published ex_cldr_calendars version 1.23.1 with the following changelog entry:

Bug Fixes