@@ -786,26 +786,26 @@ ThrowCompletionOr<double> resolve_iso_month(VM& vm, Object const& fields)
786
786
if (month_code_string[0 ] != 0x4D )
787
787
return vm.throw_completion <RangeError>(ErrorType::TemporalInvalidMonthCode);
788
788
789
- // 9. Let numberPart be the substring of monthCode from 1.
790
- auto number_part = month_code_string.substring (1 );
789
+ // 9. Let monthCodeDigits be the substring of monthCode from 1.
790
+ auto month_code_digits = month_code_string.substring (1 );
791
791
792
- // 10. If ParseText(StringToCodePoints(numberPart ), DateMonth) is a List of errors, throw a RangeError exception.
793
- auto parse_result = parse_iso8601 (Production::DateMonth, number_part );
792
+ // 10. If ParseText(StringToCodePoints(monthCodeDigits ), DateMonth) is a List of errors, throw a RangeError exception.
793
+ auto parse_result = parse_iso8601 (Production::DateMonth, month_code_digits );
794
794
if (!parse_result.has_value ())
795
795
return vm.throw_completion <RangeError>(ErrorType::TemporalInvalidMonthCode);
796
796
797
- // 11. Set numberPart to ! ToIntegerOrInfinity(numberPart ).
798
- auto number_part_integer = MUST (Value (js_string (vm, move (number_part ))).to_integer_or_infinity (vm));
797
+ // 11. Let monthCodeNumber be ! ToIntegerOrInfinity(monthCodeDigits ).
798
+ auto month_code_number = MUST (Value (js_string (vm, move (month_code_digits ))).to_integer_or_infinity (vm));
799
799
800
- // 12. Assert: SameValue(monthCode, BuildISOMonthCode(numberPart )) is true.
801
- VERIFY (month_code_string == build_iso_month_code (number_part_integer ));
800
+ // 12. Assert: SameValue(monthCode, BuildISOMonthCode(monthCodeNumber )) is true.
801
+ VERIFY (month_code_string == build_iso_month_code (month_code_number ));
802
802
803
- // 13. If month is not undefined and SameValue(month, numberPart ) is false, throw a RangeError exception.
804
- if (!month.is_undefined () && month.as_double () != number_part_integer )
803
+ // 13. If month is not undefined and SameValue(month, monthCodeNumber ) is false, throw a RangeError exception.
804
+ if (!month.is_undefined () && month.as_double () != month_code_number )
805
805
return vm.throw_completion <RangeError>(ErrorType::TemporalInvalidMonthCode);
806
806
807
- // 14. Return numberPart .
808
- return number_part_integer ;
807
+ // 14. Return monthCodeNumber .
808
+ return month_code_number ;
809
809
}
810
810
811
811
// 12.2.34 ISODateFromFields ( fields, options ), https://tc39.es/proposal-temporal/#sec-temporal-isodatefromfields
0 commit comments