mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibJS: Mark a call of CreateTemporalDate as infallible
This is an editorial change in the Temporal spec.
See: c403d3f
This commit is contained in:
parent
817c79431d
commit
125530c71d
1 changed files with 2 additions and 2 deletions
|
@ -434,8 +434,8 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::with_calendar)
|
|||
// 3. Let calendar be ? ToTemporalCalendar(calendarLike).
|
||||
auto* calendar = TRY(to_temporal_calendar(global_object, calendar_like));
|
||||
|
||||
// 4. Return ? CreateTemporalDate(temporalDate.[[ISOYear]], temporalDate.[[ISOMonth]], temporalDate.[[ISODay]], calendar).
|
||||
return TRY(create_temporal_date(global_object, temporal_date->iso_year(), temporal_date->iso_month(), temporal_date->iso_day(), *calendar));
|
||||
// 4. Return ! CreateTemporalDate(temporalDate.[[ISOYear]], temporalDate.[[ISOMonth]], temporalDate.[[ISODay]], calendar).
|
||||
return MUST(create_temporal_date(global_object, temporal_date->iso_year(), temporal_date->iso_month(), temporal_date->iso_day(), *calendar));
|
||||
}
|
||||
|
||||
// 3.3.23 Temporal.PlainDate.prototype.until ( other [ , options ] ), https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.until
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue