-
Notifications
You must be signed in to change notification settings - Fork 75
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 support for WEEK/DAY period #979
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bonjourmauko
added
kind:feat
A feature request, a feature deprecation
policy:rfc
Request For Comments: chime in!
labels
Mar 11, 2021
bonjourmauko
changed the title
[RFC] Add support for WEEK/DAY period
Add support for WEEK/DAY period
Oct 4, 2021
Draft
Superseded by #1146 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New features
This is a test-driven attempt to capitalise on #966 from @nikhilwoodruff, to add support for weeks in OpenFisca.
The main difference is that this draft makes a distinction between
days
andweekdays
.In doing so, we can treat both ISO dates and ISO week dates interchangeably.
Scope is yet more limited than your examples @nikhilwoodruff.
My idea would be to rely on
Instant
for values, and let Period handle both date types,2014-01-03
and2014-W3-1
.We could either let the parser do that with the actual
type
string, or separate the two periods in different classes and letPeriod
orchestrate/dispatch between the two as needed.Yes, as long as we identify common years of 52W or leap years of 53W, or that we use the average of ~52.2 weeks per year.
TBD
TBD
Comments? @sandcha @guillett @Morendil @Br3nda @sarafalamaki @benjello et al.