Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Month.from_day! ist unnötig #17

Open
elitau opened this issue Sep 14, 2021 · 0 comments
Open

Month.from_day! ist unnötig #17

elitau opened this issue Sep 14, 2021 · 0 comments

Comments

@elitau
Copy link
Contributor

elitau commented Sep 14, 2021

Month.from_day!(Date.t()) geht davon aus, dass jemand manuell ein Date Struct baut und dieses als Argument übergibt.
Denn Date.new(2018,13,17) wirft bereits ein Fehlertupel {:error, :invalid_date}.

Wir sollten daher die Funktion als deprecated markieren und loswerden und die Funktion Month.from_day/1 sollte anstatt eines Tupels direkt ein Month zurück geben.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant