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 Weekday::days_since. #1249

Merged
merged 1 commit into from
Apr 6, 2024
Merged

Add Weekday::days_since. #1249

merged 1 commit into from
Apr 6, 2024

Conversation

pitdicker
Copy link
Collaborator

@pitdicker pitdicker commented Sep 2, 2023

This resurrects the work in #216 by @clarfonthey.

WeekDay::days_since doesn't offer any new functionality, but I quite like its API.

Fixes #201, #1560.

@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.80%. Comparing base (0cfc405) to head (ba7ec9d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1249   +/-   ##
=======================================
  Coverage   91.80%   91.80%           
=======================================
  Files          37       37           
  Lines       18148    18151    +3     
=======================================
+ Hits        16661    16664    +3     
  Misses       1487     1487           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pitdicker
Copy link
Collaborator Author

Hmm, it must be late 😆. I'll fix it to actually work, and merge it with the not-public WeekDay::num_days_from that does the same thing.

@pitdicker pitdicker marked this pull request as draft September 2, 2023 21:09
@pitdicker pitdicker force-pushed the days_since branch 2 times, most recently from 1b0831a to 1091e16 Compare September 3, 2023 09:37
@pitdicker pitdicker marked this pull request as ready for review September 3, 2023 11:08
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just squash these commits and make sure that days_since() lives underneath the existing methods?

(You can keep the original author around with an Co-authored-by: tag in the commit message.)

@pitdicker
Copy link
Collaborator Author

'Co-authored-by:` is new for me, I'll have to learn about that.

Co-authored-by: Paul Dicker <paul@pitdicker.nl>
@pitdicker
Copy link
Collaborator Author

Thank you! It doesn't render special in Git Gui, but I guess this is it...

@pitdicker pitdicker merged commit f8cecbe into chronotope:main Apr 6, 2024
35 checks passed
@pitdicker pitdicker deleted the days_since branch April 6, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace weekday-number methods with a single days_since method
3 participants