-
Notifications
You must be signed in to change notification settings - Fork 159
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
Update from() methods. #502
Conversation
Codecov Report
@@ Coverage Diff @@
## main #502 +/- ##
==========================================
+ Coverage 96.83% 97.56% +0.72%
==========================================
Files 17 17
Lines 3953 3986 +33
Branches 582 583 +1
==========================================
+ Hits 3828 3889 +61
+ Misses 123 95 -28
Partials 2 2
Continue to review full report at Codecov.
|
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.
Very few comments, only the one about naming.
Otherwise, maybe someone else should take a look too since I helped with some of the commits.
Co-authored-by: Philip Chimento <[email protected]>
…bjects. Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
Each type's from() method (excluding Absolute and TimeZone, which cannot take property bags) now calls a new abstract operation, ToFooRecord, which takes a property bag or an object of the actual type, and returns a Record with the appropriate slots. If the argument isn't an object, then from() calls ParseFooString directly. We delete the FooFromString and ToFoo operations. In either case, from() will then apply the disambiguation (if applicable) and create the Temporal object. Co-authored-by: Philip Chimento <[email protected]>
Co-authored-by: Philip Chimento <[email protected]>
71d1898
to
6703c26
Compare
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.
LGTM, thanks for the extensive PR. Regarding the "same object" comment in the docs, maybe you could clarify by saying that it returns a new object with the same values, but I don't feel strongly about it.
Co-authored-by: Philip Chimento <[email protected]>
4116676
to
d0d9567
Compare
No description provided.