mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibJS: Adjust grammar for DateExtendedYear to exclude -000000
This is an editorial change in the Temporal spec.
See: fb3e656
We lose the custom error message, but it's not the end of the world.
This commit is contained in:
parent
68af8649fb
commit
54af3a5396
Notes:
sideshowbarker
2024-07-17 17:35:51 +09:00
Author: https://github.com/linusg
Commit: 54af3a5396
Pull-request: https://github.com/SerenityOS/serenity/pull/12990
Reviewed-by: https://github.com/IdanHo ✅
Reviewed-by: https://github.com/Lubrsi
8 changed files with 28 additions and 30 deletions
|
@ -265,6 +265,9 @@ bool ISO8601Parser::parse_date_year()
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// It is a Syntax Error if DateExtendedYear is "-000000" or "−000000" (U+2212 MINUS SIGN followed by 000000).
|
||||
if (transaction.parsed_string_view().is_one_of("-000000"sv, "−000000"sv))
|
||||
return false;
|
||||
m_state.parse_result.date_year = transaction.parsed_string_view();
|
||||
transaction.commit();
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue