Skip to content

Normative: Fix sign in PlainYearMonth.subtract#2002

Merged
ptomato merged 1 commit intomainfrom
1863-plainyearmonth-subtract-negated
Mar 29, 2022
Merged

Normative: Fix sign in PlainYearMonth.subtract#2002
ptomato merged 1 commit intomainfrom
1863-plainyearmonth-subtract-negated

Conversation

@ptomato
Copy link
Collaborator

@ptomato ptomato commented Jan 13, 2022

The duration has to be negated up front, otherwise the sign < 0 test is
wrong.

No change in functionality in the polyfill, which already handled this
correctly. This is already covered by tests.

Closes: #1863

@ptomato ptomato added spec-text Specification text involved needs plenary input Needs to be presented to the committee and feedback incorporated labels Jan 13, 2022
@ptomato
Copy link
Collaborator Author

ptomato commented Jan 13, 2022

cc @FrankYFTang

@ptomato
Copy link
Collaborator Author

ptomato commented Jan 13, 2022

Draft until presented at TC39

@ptomato ptomato marked this pull request as draft January 13, 2022 17:44
@ptomato ptomato force-pushed the 1863-plainyearmonth-subtract-negated branch from 40a38ae to 2a8f55c Compare January 13, 2022 18:05
@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #2002 (bd52e69) into main (4776571) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2002   +/-   ##
=======================================
  Coverage   92.19%   92.19%           
=======================================
  Files          19       19           
  Lines       10928    10928           
  Branches     1571     1571           
=======================================
  Hits        10075    10075           
  Misses        835      835           
  Partials       18       18           
Flag Coverage Δ
test262 82.56% <ø> (ø)
tests 84.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4776571...bd52e69. Read the comment docs.

@ptomato ptomato marked this pull request as ready for review March 29, 2022 16:56
@ptomato
Copy link
Collaborator Author

ptomato commented Mar 29, 2022

This achieved consensus at the March 2022 TC39 plenary meeting.

The duration has to be negated up front, otherwise the _sign_ < 0 test is
wrong.

No change in functionality in the polyfill, which already handled this
correctly. This is already covered by tests.

Closes: #1863
@ptomato ptomato force-pushed the 1863-plainyearmonth-subtract-negated branch from 2a8f55c to bd52e69 Compare March 29, 2022 17:05
@ptomato ptomato merged commit 6cf421b into main Mar 29, 2022
@ptomato ptomato deleted the 1863-plainyearmonth-subtract-negated branch March 29, 2022 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs plenary input Needs to be presented to the committee and feedback incorporated spec-text Specification text involved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should CalendarDaysInMonth be called in Temporal.PlainYearMonth.prototype.subtract

3 participants