Dates.h 818 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2023, stelar7 <dudedbz@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Forward.h>
  8. #include <AK/String.h>
  9. #include <LibJS/Runtime/Date.h>
  10. #include <LibWeb/WebIDL/ExceptionOr.h>
  11. namespace Web::HTML {
  12. u32 week_number_of_the_last_day(u64 year);
  13. bool is_valid_week_string(StringView value);
  14. bool is_valid_month_string(StringView value);
  15. bool is_valid_date_string(StringView value);
  16. WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Date>> parse_date_string(JS::Realm& realm, StringView value);
  17. bool is_valid_local_date_and_time_string(StringView value);
  18. String normalize_local_date_and_time_string(String const& value);
  19. bool is_valid_time_string(StringView value);
  20. WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Date>> parse_time_string(JS::Realm& realm, StringView value);
  21. }