You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is pretty niche, but I forgot which version of Elixir allowed dates to have negative years, I've been using it for a project of mine with great success, until I needed to use some Timex.diff/3 on it, granted I could just use Date.diff/2 in some cases, but if anything outside of days is required, well...
** (FunctionClauseError) no function clause matching in :calendar.last_day_of_the_month/2
The following arguments were given to :calendar.last_day_of_the_month/2:
# 1
-1755
# 2
1
(stdlib 6.1) calendar.erl:373: :calendar.last_day_of_the_month/2
(stdlib 6.1) calendar.erl:222: :calendar.date_to_gregorian_days/3
(stdlib 6.1) calendar.erl:252: :calendar.datetime_to_gregorian_seconds/1
(timex 3.7.11) lib/date/date.ex:16: Timex.Protocol.Date.to_gregorian_microseconds/1
(timex 3.7.11) lib/comparable/diff.ex:15: Timex.Comparable.Diff.diff/3
iex:2: (file)
So there might be room to utilize Elixir's date/time modules in more places rather than relying on erlang's calendar, I have no idea what it would take to make this work (not that familiar with the internals of Timex)
The text was updated successfully, but these errors were encountered:
This is pretty niche, but I forgot which version of Elixir allowed dates to have negative years, I've been using it for a project of mine with great success, until I needed to use some
Timex.diff/3
on it, granted I could just useDate.diff/2
in some cases, but if anything outside of days is required, well...Steps to reproduce
Description of issue
So there might be room to utilize Elixir's date/time modules in more places rather than relying on erlang's calendar, I have no idea what it would take to make this work (not that familiar with the internals of Timex)
The text was updated successfully, but these errors were encountered: