summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-05-06 19:34:59 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-08 00:07:58 +0200
commit938e68d003ae91f3c95b53ae2a234534ff72f438 (patch)
treed48729bdd945068228b1a54908705dd823847804 /Userland/Libraries
parent15fe6297bc333b4bacdbe1aa83fe0ae3addd796b (diff)
downloadserenity-938e68d003ae91f3c95b53ae2a234534ff72f438.zip
LibJS: Remove type assertion comment from IsValidISODate
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ddb5652
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
index 1243776e4c..f571dd5c11 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDate.cpp
@@ -374,24 +374,22 @@ ThrowCompletionOr<ISODate> regulate_iso_date(GlobalObject& global_object, double
// 3.5.5 IsValidISODate ( year, month, day ), https://tc39.es/proposal-temporal/#sec-temporal-isvalidisodate
bool is_valid_iso_date(i32 year, u8 month, u8 day)
{
- // 1. Assert: year, month, and day are integers.
-
- // 2. If month < 1 or month > 12, then
+ // 1. If month < 1 or month > 12, then
if (month < 1 || month > 12) {
// a. Return false.
return false;
}
- // 3. Let daysInMonth be ! ISODaysInMonth(year, month).
+ // 2. Let daysInMonth be ! ISODaysInMonth(year, month).
auto days_in_month = iso_days_in_month(year, month);
- // 4. If day < 1 or day > daysInMonth, then
+ // 3. If day < 1 or day > daysInMonth, then
if (day < 1 || day > days_in_month) {
// a. Return false.
return false;
}
- // 5. Return true.
+ // 4. Return true.
return true;
}