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

Add day_of_year and week_of_year #717

Merged

Conversation

billylanchantin
Copy link
Contributor

Description

Closes: #714

This PR adds the following date functions:

Explorer Polars Description
day_of_year ordinal_day Day of year from 1 to 366
week_of_year week Week of year from 1 to 53

Notes

Rather than matching Polars exactly, I chose to follow the x_of_y pattern established by day_of_week.

lib/explorer/series.ex Outdated Show resolved Hide resolved
lib/explorer/series.ex Outdated Show resolved Hide resolved
@josevalim josevalim merged commit aef2749 into elixir-explorer:main Sep 27, 2023
3 of 4 checks passed
@josevalim
Copy link
Member

Beautifully done, thank you @billylanchantin! 💚 💙 💜 💛 ❤️

I just changed the docs to keep the first paragraph a short sentence, as that is used as a summary by the docs. :)

@billylanchantin
Copy link
Contributor Author

You're welcome!

I just changed the docs to keep the first paragraph a short sentence, as that is used as a summary by the docs. :)

Noted! I'll remember that for the future.

@billylanchantin billylanchantin deleted the add-missing-date-functions branch September 28, 2023 12:42
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

Successfully merging this pull request may close these issues.

Date(time) to Calendar week
2 participants