-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is a patch for some things I found while doing some implementation of `temporal_rs` in Boa. The things the PR addresses / patches - Adds a `DateTime::from_date_and_time` - I noticed that the `with` methods weren't checking whether the partials were empty, which would not be valid. This update throws an early error if the partial provided is empty. - Changed the internal way for constructing a `TemporalFields` from a `PartialDate`. Primarily, after doing the implementation, I don't think having a `From<PartialDate> for TemporalFields` is a good idea. We will still need it internally, but I'm now leaning more towards using the calendar to generate the fields from a partial. Something akin to `calendar::create_fields_from_partial_date(partial_date)`.
- Loading branch information
Showing
4 changed files
with
101 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
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