Home
last modified time | relevance | path

Searched refs:locale (Results 1 – 14 of 14) sorted by relevance

/ark/js_runtime/ecmascript/builtins/
Dbuiltins_locale.cpp40 JSHandle<JSLocale> locale = in LocaleConstructor() local
74 … JSHandle<JSLocale> result = JSLocale::InitializeLocale(thread, locale, localeString, optionsObj); in LocaleConstructor()
92 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in Maximize() local
93 icu::Locale source(*(locale->GetIcuLocale())); in Maximize()
124 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in Minimize() local
125 icu::Locale source(*(locale->GetIcuLocale())); in Minimize()
171 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in GetBaseName() local
172 icu::Locale icuLocale = icu::Locale::createFromName(locale->GetIcuLocale()->getBaseName()); in GetBaseName()
188 JSHandle<JSLocale> locale = JSHandle<JSLocale>::Cast(loc); in GetCalendar() local
189 JSHandle<EcmaString> calendar = JSLocale::NormalizeKeywordValue(thread, locale, "ca"); in GetCalendar()
[all …]
Dbuiltins_string.cpp1368 …std::string locale = JSLocale::BestAvailableLocale(thread, availableLocales, noExtensionsLocale.ba… in ToLocaleLowerCase() local
1372 if (locale.empty()) { in ToLocaleLowerCase()
1373 locale = "und"; in ToLocaleLowerCase()
1379 icu::Locale icuLocale = icu::Locale::createFromName(locale.c_str()); in ToLocaleLowerCase()
1436 …std::string locale = JSLocale::BestAvailableLocale(thread, availableLocales, noExtensionsLocale.ba… in ToLocaleUpperCase() local
1440 if (locale.empty()) { in ToLocaleUpperCase()
1441 locale = "und"; in ToLocaleUpperCase()
1447 icu::Locale icuLocale = icu::Locale::createFromName(locale.c_str()); in ToLocaleUpperCase()
/ark/js_runtime/ecmascript/
Djs_locale.cpp62 …String> JSLocale::CanonicalizeUnicodeLocaleId(JSThread *thread, const JSHandle<EcmaString> &locale) in CanonicalizeUnicodeLocaleId() argument
65 if (!IsStructurallyValidLanguageTag(locale)) { in CanonicalizeUnicodeLocaleId()
69 if (locale->GetLength() == 0 || locale->IsUtf16()) { in CanonicalizeUnicodeLocaleId()
73 std::string localeCStr = ConvertToStdString(locale); in CanonicalizeUnicodeLocaleId()
294 const std::string &locale) in BestAvailableLocale() argument
297 std::string localeCandidate = locale; in BestAvailableLocale()
335 JSMutableHandle<EcmaString> locale(thread, JSTaggedValue::Undefined()); in LookupMatcher() local
337 locale.Update(requestedLocales->Get(thread, i)); in LookupMatcher()
340 ParsedLocale parsedResult = HandleLocale(locale); in LookupMatcher()
347 result.locale = availableLocale; in LookupMatcher()
[all …]
Djs_locale.h123 std::string locale {};
129 std::string locale; member
193 …ndle<EcmaString> CanonicalizeUnicodeLocaleId(JSThread *thread, const JSHandle<EcmaString> &locale);
210 const std::string &locale);
357 static bool IsWellCollation(const icu::Locale &locale, const std::string &value) in IsWellCollation() argument
363 return IsWellExtension<icu::Collator>(locale, "collation", value); in IsWellCollation()
366 static bool IsWellCalendar(const icu::Locale &locale, const std::string &value) in IsWellCalendar() argument
368 return IsWellExtension<icu::Calendar>(locale, "calendar", value); in IsWellCalendar()
372 … static bool IsWellExtension(const icu::Locale &locale, const char *key, const std::string &value) in IsWellExtension() argument
379 …icu::StringEnumeration *sequence = T::getKeywordValuesForLocale(key, icu::Locale(locale.getBaseNam… in IsWellExtension()
[all …]
Decma_vm.h414 void SetIcuFormatterToCache(IcuFormatterType type, const std::string &locale, void *icuObj,
417 EcmaVM::IcuFormatter icuFormatter = IcuFormatter(locale, icuObj, deleteEntry);
421 void *GetIcuFormatterFromCache(IcuFormatterType type, std::string locale) in GetIcuFormatterFromCache() argument
426 if (icuFormatter.locale == locale) { in GetIcuFormatterFromCache()
539 std::string locale; member
544 IcuFormatter(const std::string &locale, void *icuObj, IcuDeleteEntry deleteEntry = nullptr)
545 : locale(locale), icuObj(icuObj), deleteEntry(deleteEntry) {} in locale() function
Djs_plural_rules.cpp107 for (const std::string &locale : icuAvailableLocales) { in BuildLocaleSet() local
108 JSHandle<EcmaString> localeStr = factory->NewFromStdString(locale); in BuildLocaleSet()
117 const char *locale = nullptr; in GetNextLocale() local
118 locale = locales->next(len, status); in GetNextLocale()
119 if (!U_SUCCESS(status) || locale == nullptr) { in GetNextLocale()
123 localeStr = std::string(locale); in GetNextLocale()
305 JSHandle<EcmaString> locale(thread, pluralRules->GetLocale()); in ResolvedOptions() local
306 PropertyDescriptor localeDesc(thread, JSHandle<JSTaggedValue>::Cast(locale), true, true, true); in ResolvedOptions()
Djs_date_time_format.cpp837 JSHandle<JSTaggedValue> locale(thread, dateTimeFormat->GetLocale()); in ResolvedOptions() local
839 JSObject::CreateDataPropertyOrThrow(thread, options, property, locale); in ResolvedOptions()
1237 std::unique_ptr<icu::Calendar> JSDateTimeFormat::BuildCalendar(const icu::Locale &locale, const icu… in BuildCalendar() argument
1240 … std::unique_ptr<icu::Calendar> calendar(icu::Calendar::createInstance(timeZone, locale, status)); in BuildCalendar()
1491 icu::Locale locale = *(dtf->GetIcuLocale()); in ConstructDateIntervalFormat() local
1496 locale.setUnicodeKeywordValue("hc", hcString, status); in ConstructDateIntervalFormat()
1505 icu::DateIntervalFormat::createInstance(skeleton, locale, status)); in ConstructDateIntervalFormat()
Djs_collator.cpp398 JSHandle<JSTaggedValue> locale(thread, collator->GetLocale()); in ResolvedOptions() local
399 JSObject::CreateDataPropertyOrThrow(thread, options, property, locale); in ResolvedOptions()
Djs_date_time_format.h184 …static std::unique_ptr<icu::Calendar> BuildCalendar(const icu::Locale &locale, const icu::TimeZone…
Djs_relative_time_format.cpp479 JSHandle<EcmaString> locale(thread, relativeTimeFormat->GetLocale()); in ResolvedOptions() local
480 PropertyDescriptor localeDesc(thread, JSHandle<JSTaggedValue>::Cast(locale), true, true, true); in ResolvedOptions()
Djs_number_format.cpp928 JSHandle<JSTaggedValue> locale(thread, numberFormat->GetLocale()); in ResolvedOptions() local
929 JSObject::CreateDataPropertyOrThrow(thread, options, property, locale); in ResolvedOptions()
Dglobal_env_constants.h206 …V(JSTaggedValue, LocaleString, LOCALE_STRING_INDEX, locale) …
/ark/ts2abc/test262/
Des2015_tests.txt4840 intl402/Locale/constructor-locale-object.js
4916 intl402/Locale/canonicalize-locale-list-take-locale.js
4926 intl402/supportedLocalesOf-default-locale-and-zxx-locale.js
4943 intl402/default-locale-is-canonicalized.js
4975 intl402/Intl/getCanonicalLocales/get-locale.js
5064 intl402/DateTimeFormat/prototype/resolvedOptions/resolved-locale-with-hc-unicode.js
5137 intl402/default-locale-is-supported.js
/ark/ts2abc/testTs/
Dtest-case.patch4429 +function log(locale: string) {
4431 + `${new Intl.DateTimeFormat(locale).format(date)} ${new Intl.NumberFormat(locale).format(count)…
10166 + locale.toFixed()