[Temporal] Implement comparison methods for PlainYearMonth#55076
Conversation
|
EWS run on previous version of this PR (hash 436df1d) Details |
Source/JavaScriptCore/runtime/TemporalPlainYearMonthPrototype.cpp
Outdated
Show resolved
Hide resolved
| if (yearMonth->plainYearMonth() != other->plainYearMonth()) | ||
| return JSValue::encode(jsBoolean(false)); | ||
|
|
||
| return JSValue::encode(jsBoolean(true)); |
There was a problem hiding this comment.
Shouldn't we compare calendar here like for PlainDate#equals ?
There was a problem hiding this comment.
On the one hand yes, on the other hand having different calendar values is currently not implemented...
There was a problem hiding this comment.
PlainYearMonth doesn't have a calendar field yet, because as Philip mentioned, different calendars aren't implemented yet.
There was a problem hiding this comment.
Yes, I know that different calendar is not implemented. However, I thought that if it would be needed in the future, it might as well be implemented in this PR for consistency with PlainDate#equals.
But I think this is a minor issue and will eventually be implemented and tested, so it is acceptable for me
|
EWS run on previous version of this PR (hash 962b9d5) Details |
962b9d5 to
97b1f6d
Compare
|
EWS run on current version of this PR (hash 97b1f6d) Details |
https://bugs.webkit.org/show_bug.cgi?id=303799 Reviewed by Sosuke Suzuki. Co-authored-by: SUZUKI Sosuke <[email protected]> Implement `compare`, `equals`, and `valueOf`. * JSTests/stress/temporal-plainyearmonth.js: (shouldBe): (shouldThrow): * JSTests/test262/config.yaml: * Source/JavaScriptCore/runtime/TemporalPlainYearMonthConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/TemporalPlainYearMonthPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Canonical link: https://commits.webkit.org/304196@main
97b1f6d to
bd18128
Compare
|
Committed 304196@main (bd18128): https://commits.webkit.org/304196@main Reviewed commits have been landed. Closing PR #55076 and removing active labels. |
bd18128
97b1f6d
🧪 win-tests🧪 api-ios🧪 gtk-wk2🛠 playstation