calendar_interval
calendar_interval copied to clipboard
Change `Enumerable.member?` implementation to take precision into account
Ref https://github.com/wojtekmach/calendar_interval/pull/6#discussion_r323873568
tl;dr we're currently, arguably, breaking the enumerable contract, see this discrepancy:
iex> ~D[2020-01-01] in ~I"2020-01/12"
true
iex> Enum.filter(~I"2020-01/12", & &1 == ~D[2020-01-01])
[]
the change would be to make:
iex> ~D[2020-01-01] in ~I"2020-01/12"
false
@kipcole9 would making this change break your apps?