mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibJS: Format the era of ISO year 0 as BC
This is a normative change in the ECMA-402 spec. See:
2034315
This commit is contained in:
parent
f0312de7eb
commit
bb4fda3b97
2 changed files with 13 additions and 2 deletions
|
@ -1235,8 +1235,8 @@ ThrowCompletionOr<LocalTime> to_local_time(VM& vm, Crypto::SignedBigInteger cons
|
|||
return LocalTime {
|
||||
// WeekDay(𝔽(floor(tz / 10^6)))
|
||||
.weekday = week_day(zoned_time),
|
||||
// Let year be YearFromTime(𝔽(floor(tz / 10^6))). If year < -0𝔽, return "BC", else return "AD".
|
||||
.era = year < 0 ? ::Locale::Era::BC : ::Locale::Era::AD,
|
||||
// Let year be YearFromTime(𝔽(floor(tz / 10^6))). If year < 1𝔽, return "BC", else return "AD".
|
||||
.era = year < 1 ? ::Locale::Era::BC : ::Locale::Era::AD,
|
||||
// YearFromTime(𝔽(floor(tz / 10^6)))
|
||||
.year = year,
|
||||
// undefined.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue