1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

AK: Add a DateTimeLexer

This is an AK::GenericLexer that exposes helper methods for parsing
date and time related literals (years, months, days, hours, minutes,
seconds, fractional seconds & more)
This commit is contained in:
Idan Horowitz 2021-07-11 21:00:04 +03:00 committed by Linus Groh
parent 39a9cf4bb4
commit 141c46feda
3 changed files with 146 additions and 38 deletions

View file

@ -1,21 +0,0 @@
/*
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/String.h>
#include <LibJS/Runtime/Temporal/ISO8601.h>
namespace JS::Temporal {
// 13.33 ISO 8601 grammar, https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar
// TimeZoneNumericUTCOffset, https://tc39.es/proposal-temporal/#prod-TimeZoneNumericUTCOffset
bool is_valid_time_zone_numeric_utc_offset(String const&)
{
// TODO: Implement me :^)
return false;
}
}