mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:07:35 +00:00
LibJS: Remove the ConstrainToRange AO
This is an editorial change in the Temporal spec.
See: 537b3e6
This commit is contained in:
parent
1521c5f55c
commit
2ad69d789b
5 changed files with 41 additions and 46 deletions
|
@ -192,8 +192,8 @@ ISOYearMonth constrain_iso_year_month(double year, double month)
|
|||
// 1. Assert: year and month are integers.
|
||||
VERIFY(year == trunc(year) && month == trunc(month));
|
||||
|
||||
// 2. Set month to ! ConstrainToRange(month, 1, 12).
|
||||
month = constrain_to_range(month, 1, 12);
|
||||
// 2. Set month to the result of clamping month between 1 and 12.
|
||||
month = clamp(month, 1, 12);
|
||||
|
||||
// 3. Return the Record { [[Year]]: year, [[Month]]: month }.
|
||||
// NOTE: `year` is known to be in the i32 range.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue