mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibJS: Emit reference information for { calendarName: "always" } option
This is a normative change in the Temporal spec.
See: 4f7519a
This commit is contained in:
parent
29aa938fa5
commit
b5392f9e39
4 changed files with 8 additions and 6 deletions
|
@ -245,8 +245,8 @@ ThrowCompletionOr<String> temporal_year_month_to_string(GlobalObject& global_obj
|
|||
// 6. Let calendarID be ? ToString(yearMonth.[[Calendar]]).
|
||||
auto calendar_id = TRY(Value(&year_month.calendar()).to_string(global_object));
|
||||
|
||||
// 7. If calendarID is not "iso8601", then
|
||||
if (calendar_id != "iso8601") {
|
||||
// 7. If showCalendar is "always" or if calendarID is not "iso8601", then
|
||||
if (show_calendar == "always"sv || calendar_id != "iso8601") {
|
||||
// a. Let day be yearMonth.[[ISODay]] formatted as a two-digit decimal number, padded to the left with a zero if necessary.
|
||||
// b. Set result to the string-concatenation of result, the code unit 0x002D (HYPHEN-MINUS), and day.
|
||||
result = String::formatted("{}-{:02}", result, year_month.iso_day());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue