LibJS: Parse dates like "2025-01-02 14:00:00+0000"

This was getting spammed in the console by a website in the wild.
This commit is contained in:
Shannon Booth 2025-01-03 22:08:39 +13:00 committed by Tim Flynn
commit c804d08d34
Notes: github-actions[bot] 2025-01-03 22:44:04 +00:00
2 changed files with 3 additions and 1 deletions

View file

@ -189,7 +189,8 @@ static double parse_date_string(VM& vm, StringView date_string)
"%d%t%b%t%Y%t%R"sv, // "01 Jan 2000 08:00"
"%A,%t%B%t%e,%t%Y,%t%R%t%Z"sv, // "Tuesday, October 29, 2024, 18:00 UTC"
"%B%t%d%t%Y%t%T%t%z"sv, // "November 19 2024 00:00:00 +0900"
"%a%t%b%t%e%t%Y"sv // "Wed Nov 20 2024"
"%a%t%b%t%e%t%Y"sv, // "Wed Nov 20 2024"
"%Y-%m-%d%t%H:%M:%S%z"sv, // "2024-12-30 03:00:00+0000"
};
for (auto const& format : extra_formats) {