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

Weekday based calculations #183

Closed
ChristopherRabotin opened this issue Dec 2, 2022 · 0 comments · Fixed by #180
Closed

Weekday based calculations #183

ChristopherRabotin opened this issue Dec 2, 2022 · 0 comments · Fixed by #180

Comments

@ChristopherRabotin
Copy link
Member

Subsequently to #181 , it should be possible to perform simple computations on week days.

Given an epoch, one may wish to find the next Monday or the previous Friday. This could be done with my_epoch.when_next(Weekday::Monday) or my_epoch.when_previous(Weekday::Friday).

This implementation requires computing the day of the week in the current time scale first (and this is a required computation in #181 ).

ChristopherRabotin added a commit to gwbres/hifitime that referenced this issue Dec 3, 2022
Also add `with_hms` and `with_hms_strict` to set the time of a given Epoch

Closes nyx-space#183

Signed-off-by: Christopher Rabotin <christopher.rabotin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant