You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/calendar.html
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -82,19 +82,22 @@ <h1>
82
82
<emu-alg>
83
83
1. Let _monthCode_ be ? ToPrimitive(_argument_, ~string~).
84
84
1. If _monthCode_ is not a String, throw a *TypeError* exception.
85
-
1. If the length of _monthCode_ is not 3 or 4, throw a *RangeError* exception.
86
-
1. If the first code unit of _monthCode_ is not 0x004D (LATIN CAPITAL LETTER M), throw a *RangeError* exception.
87
-
1. If the second code unit of _monthCode_ is not in the inclusive interval from 0x0030 (DIGIT ZERO) to 0x0039 (DIGIT NINE), throw a *RangeError* exception.
88
-
1. If the third code unit of _monthCode_ is not in the inclusive interval from 0x0030 (DIGIT ZERO) to 0x0039 (DIGIT NINE), throw a *RangeError* exception.
85
+
1. If ParseText(StringToCodePoints(_monthCode_), |MonthCode|) is a List of errors, throw a *RangeError* exception.
89
86
1. Let _isLeapMonth_ be *false*.
90
87
1. If the length of _monthCode_ is 4, then
91
-
1.If the fourth code unit of _monthCode_ is not 0x004C (LATIN CAPITAL LETTER L), throw a *RangeError* exception.
88
+
1.Assert: The fourth code unit of _monthCode_ is 0x004C (LATIN CAPITAL LETTER L).
92
89
1. Set _isLeapMonth_ to *true*.
93
90
1. Let _monthCodeDigits_ be the substring of _monthCode_ from 1 to 3.
94
91
1. Let _monthNumber_ be ℝ(StringToNumber(_monthCodeDigits_)).
95
92
1. If _monthNumber_ is 0 and _isLeapMonth_ is *false*, throw a *RangeError* exception.
96
93
1. Return the Record { [[MonthNumber]]: _monthNumber_, [[IsLeapMonth]]: _isLeapMonth_ }.
0 commit comments