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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename weekday and weekday0 kernels to to num_days_from_monday and days_since_sunday #2065

Closed
alamb opened this issue Jul 14, 2022 · 0 comments 路 Fixed by #2066
Closed

Rename weekday and weekday0 kernels to to num_days_from_monday and days_since_sunday #2065

alamb opened this issue Jul 14, 2022 · 0 comments 路 Fixed by #2066
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Jul 14, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Depending on the usecase sometimes one wants the days of week to start from Sunday or Monday. Dates 馃し

@ovr added the weekday0 kernel in #2052

But now the names are weekday and weekday0 which I think might be confusing to the average reader

Describe the solution you'd like
I propose we follow the chrono naming scheme num_days_from_sunday and num_days_from_monday

https://docs.rs/chrono/0.4.19/chrono/enum.Weekday.html#method.num_days_from_sunday
https://docs.rs/chrono/0.4.19/chrono/enum.Weekday.html#method.num_days_from_monday

Describe alternatives you've considered
We could do nothing and handle any potential confusion with documentation

Additional context
Add any other context or screenshots about the feature request here.

@alamb alamb added arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog labels Jul 14, 2022
@alamb alamb changed the title Rename weekday and weekday0 kenrels to to num_days_from_monday and days_since_sunday Rename weekday and weekday0 kernels to to num_days_from_monday and days_since_sunday Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
1 participant