LibJS+LibUnicode: Always format zoned minutes and seconds with 2 digits

This matches the behavior of other engines.
This commit is contained in:
Timothy Flynn
2026-03-08 17:37:06 -04:00
committed by Jelle Raaijmakers
parent 544e6ee3bb
commit 49b09b3fbe
Notes: github-actions[bot] 2026-03-09 10:43:02 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -304,7 +304,7 @@ String CalendarPattern::to_pattern() const
if (minute.has_value()) {
switch (*minute) {
case CalendarPatternStyle::Numeric:
builder.append("m"sv);
builder.append(time_zone_name.has_value() ? "mm"sv : "m"sv);
break;
case CalendarPatternStyle::TwoDigit:
builder.append("mm"sv);
@@ -316,7 +316,7 @@ String CalendarPattern::to_pattern() const
if (second.has_value()) {
switch (*second) {
case CalendarPatternStyle::Numeric:
builder.append("s"sv);
builder.append(time_zone_name.has_value() ? "ss"sv : "s"sv);
break;
case CalendarPatternStyle::TwoDigit:
builder.append("ss"sv);