mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibJS+LibUnicode: Port Intl.DateTimeFormat to UTF-16 strings
This commit is contained in:
parent
b2f053e783
commit
ee01f857d1
Notes:
github-actions[bot]
2025-07-24 08:41:42 +00:00
Author: https://github.com/trflynn89
Commit: ee01f857d1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5581
6 changed files with 26 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021-2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2021-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8,10 +8,10 @@
|
|||
|
||||
#include <AK/IterationDecision.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Time.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Utf16String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibUnicode/Forward.h>
|
||||
|
||||
|
@ -151,16 +151,16 @@ public:
|
|||
|
||||
struct Partition {
|
||||
StringView type;
|
||||
String value;
|
||||
Utf16String value;
|
||||
StringView source;
|
||||
};
|
||||
|
||||
virtual CalendarPattern const& chosen_pattern() const = 0;
|
||||
|
||||
virtual String format(double) const = 0;
|
||||
virtual Utf16String format(double) const = 0;
|
||||
virtual Vector<Partition> format_to_parts(double) const = 0;
|
||||
|
||||
virtual String format_range(double, double) const = 0;
|
||||
virtual Utf16String format_range(double, double) const = 0;
|
||||
virtual Vector<Partition> format_range_to_parts(double, double) const = 0;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue