mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:17:35 +00:00
LibJS: Update spec comments to use ToZeroPaddedDecimalString AO
This is an editorial change in the ECMA-262 and Temporal specs. See: -843d8b8
-f9211d9
Note that we don't actually need to implement the AO as we already have String::formatted() for this, and use unified format strings instead of zero-padding in individual steps in many cases anyway.
This commit is contained in:
parent
431a9938a8
commit
5397278bfc
10 changed files with 41 additions and 45 deletions
|
@ -427,8 +427,8 @@ String temporal_time_to_string(u8 hour, u8 minute, u8 second, u16 millisecond, u
|
|||
{
|
||||
// 1. Assert: hour, minute, second, millisecond, microsecond and nanosecond are integers.
|
||||
|
||||
// 2. Let hour be hour formatted as a two-digit decimal number, padded to the left with a zero if necessary.
|
||||
// 3. Let minute be minute formatted as a two-digit decimal number, padded to the left with a zero if necessary.
|
||||
// 2. Let hour be ToZeroPaddedDecimalString(hour, 2).
|
||||
// 3. Let minute be ToZeroPaddedDecimalString(minute, 2).
|
||||
|
||||
// 4. Let seconds be ! FormatSecondsStringPart(second, millisecond, microsecond, nanosecond, precision).
|
||||
auto seconds = format_seconds_string_part(second, millisecond, microsecond, nanosecond, precision);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue