mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibJS: Use new LibUnicode API to format time zone names
This commit is contained in:
parent
e2dfbe8f67
commit
c1a1370c2a
Notes:
sideshowbarker
2024-07-17 21:09:19 +09:00
Author: https://github.com/trflynn89
Commit: c1a1370c2a
Pull-request: https://github.com/SerenityOS/serenity/pull/11813
Reviewed-by: https://github.com/linusg ✅
3 changed files with 28 additions and 9 deletions
|
@ -938,7 +938,7 @@ ThrowCompletionOr<Vector<PatternPartition>> format_date_time_pattern(GlobalObjec
|
|||
// The String value may also depend on the value of the [[InDST]] field of tm if f is "short", "long", "shortOffset", or "longOffset".
|
||||
// If the implementation does not have a localized representation of f, then use the String value of v itself.
|
||||
// FIXME: This should take [[InDST]] into account.
|
||||
auto formatted_value = Unicode::get_time_zone_name(data_locale, value, style).value_or(value);
|
||||
auto formatted_value = Unicode::format_time_zone(data_locale, value, style, local_time.time_since_epoch());
|
||||
|
||||
// iv. Append a new Record { [[Type]]: p, [[Value]]: fv } as the last element of the list result.
|
||||
result.append({ "timeZoneName"sv, move(formatted_value) });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue