-
Notifications
You must be signed in to change notification settings - Fork 19
Add PartialTime
and PartialDateTime
with corresponding with
methods.
#92
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
Merged
Conversation
This file contains hidden or 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
jedel1043
requested changes
Aug 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I agree with this, but I think the API needs to be discussed.
jedel1043
reviewed
Aug 15, 2024
jedel1043
approved these changes
Aug 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
nekevss
added a commit
that referenced
this pull request
Oct 14, 2024
This PR refactors `TemporalFields` into `CalendarFields`. I'm leaving it as a draft for now as I want to run plug this into Boa and run some tests beforehand. General Context: This builds on the work from #89 and #92. With the partials implemented for the `with` methods. The values that would be provided can now be accounted for. Primarily, the time fields really didn't need to exist in the `TemporalFields` representation anymore (along with the TimeZone and offset which will probably be living on the `PartialZonedDateTime`). Furthermore, the partials were now handling the `undefined` case of the fields, so the calendar specific fields no longer needed to be an `Option`. In general, I also just think that this is a better native representation of the fields values in comparison to the previous version. Furthermore, this PR also implements better handling for Era and Month Codes according to the [Intl era and monthCode proposal](https://tc39.es/proposal-intl-era-monthcode/#sec-temporal-isvalidmonthecodeforcalendar). There are a couple points where feedback/bike-shedding would definitely be appreciated. I think the method names in `calendar_types.rs` are getting a bit unyielding. I am also a bit worried about introducing the `CalendarMethods` trait, but I do think it makes the ergonomics around passing `Date`, `DateTime`, and, eventually, `ZonedDateTime` as a fallback convenient. cc: @sffc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This continues the work on implementing
with
methods with the approach from #89 by adding the same type of records toDateTime
andTime
.