Skip to content
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

Simplify ISOMonthDayFromFields #1615

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions spec/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -524,19 +524,11 @@ <h1>ISOMonthDayFromFields ( _fields_, _options_ )</h1>
1. Assert: Type(_fields_) is Object.
1. Let _overflow_ be ? ToTemporalOverflow(_options_).
1. Set _fields_ to ? PrepareTemporalFields(_fields_, « *"day"*, *"month"*, *"monthCode"*, *"year"* », «»).
1. Let _month_ be ? Get(_fields_, *"month"*).
1. Let _monthCode_ be ? Get(_fields_, *"monthCode"*).
1. Let _year_ be ? Get(_fields_, *"year"*).
1. If _month_ is not *undefined*, and _monthCode_ and _year_ are both *undefined*, then
1. Throw a *TypeError* exception.
1. Set _month_ to ? ResolveISOMonth(_fields_).
1. Let _day_ be ? Get(_fields_, *"day"*).
1. If _day_ is *undefined*, throw a *TypeError* exception.
1. Let _referenceISOYear_ be 1972 (the first leap year after the Unix epoch).
1. If _monthCode_ is *undefined*, then
1. Let _result_ be ? RegulateISODate(_year_, _month_, _day_, _overflow_).
1. Else,
1. Let _result_ be ? RegulateISODate(_referenceISOYear_, _month_, _day_, _overflow_).
1. Let _result_ be ? RegulateISODate(_referenceISOYear_, _month_, _day_, _overflow_).
1. Return the new Record {
[[Month]]: _result_.[[Month]],
[[Day]]: _result_.[[Day]],
Expand Down