Skip to content

Fix Date.from_gregorian_days/2 - #15940

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
kipcole9:main
Sep 25, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
kipcole9:main

Conversation

@kipcole9

Copy link
Copy Markdown
Contributor

Date.from_gregorian_days/2 was passing {days, 0}
to from_iso_days/2 which is an invalid day fraction.
The day fraction is ignored in Calendar.ISO so
the error is only surfaced with non-Calendar.ISO
calendars.

The day fraction is now correctly passed as
{0, 86_400}.

Date.from_gregorian_days/2 was passing {days, 0}
to from_iso_days/2 which is an invalid day fraction.
The day fraction is ignored in Calendar.ISO so
the error is only surfaced with non-Calendar.ISO
calendars.

The day fraction is now correctly passed as
{0, 86_400}.
@josevalim
josevalim merged commit f45eab4 into elixir-lang:main Sep 25, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants