LibWeb/HTML: Implement valueAsNumber for 'date' input type
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Shannon Booth 2025-02-23 23:34:06 +13:00 committed by Andreas Kling
commit 9585c6c0c7
Notes: github-actions[bot] 2025-02-26 10:50:33 +00:00
5 changed files with 108 additions and 29 deletions

View file

@ -17,7 +17,6 @@ u32 week_number_of_the_last_day(u64 year);
bool is_valid_week_string(StringView value);
bool is_valid_month_string(StringView value);
bool is_valid_date_string(StringView value);
WebIDL::ExceptionOr<GC::Ref<JS::Date>> parse_date_string(JS::Realm& realm, StringView value);
bool is_valid_local_date_and_time_string(StringView value);
String normalize_local_date_and_time_string(String const& value);
bool is_valid_time_string(StringView value);
@ -35,6 +34,14 @@ struct WeekYearAndWeek {
};
Optional<WeekYearAndWeek> parse_a_week_string(StringView);
struct YearMonthDay {
u32 year;
u32 month;
u32 day;
};
Optional<YearMonthDay> parse_a_date_string(StringView);
i32 number_of_months_since_unix_epoch(YearAndMonth);
}