/ohos5.0/base/global/i18n/frameworks/intl/src/ |
H A D | date_time_format.cpp | 29 bool DateTimeFormat::icuInitialized = DateTimeFormat::Init(); 38 std::unordered_map<std::string, DateTimeFormat::DefaultStyle> DateTimeFormat::DeviceToStyle = { 48 std::unordered_map<DateTimeFormat::DefaultStyle, DateFormat::EStyle> DateTimeFormat::DefaultDTStyle… 97 DateTimeFormat::~DateTimeFormat() in ~DateTimeFormat() 102 bool DateTimeFormat::CheckInitSuccess() in CheckInitSuccess() 110 std::unique_ptr<DateTimeFormat> DateTimeFormat::CreateInstance(const std::vector<std::string> &loca… in CreateInstance() 113 …std::unique_ptr<DateTimeFormat> dateTimeFormat = std::make_unique<DateTimeFormat>(localeTags, conf… in CreateInstance() 239 void DateTimeFormat::RemoveAmPmChar() in RemoveAmPmChar() 332 void DateTimeFormat::SetDayPeriod() in SetDayPeriod() 777 bool DateTimeFormat::Init() in Init() [all …]
|
/ohos5.0/base/global/i18n_lite/frameworks/i18n/src/ |
H A D | date_time_format.cpp | 29 DateTimeFormat::DateTimeFormat(AvailableDateTimeFormatPattern requestPattern, const LocaleInfo &loc… in DateTimeFormat() function in DateTimeFormat 35 DateTimeFormat::~DateTimeFormat() in ~DateTimeFormat() 43 bool DateTimeFormat::Init() in Init() 94 void DateTimeFormat::Format(const time_t &cal, const string &zoneInfo, string &appendTo, I18nStatus… in Format() 106 void DateTimeFormat::ApplyPattern(const AvailableDateTimeFormatPattern &requestPattern) in ApplyPattern() 119 std::string DateTimeFormat::GetWeekName(const int32_t &index, DateTimeDataType type) in GetWeekName() 130 std::string DateTimeFormat::GetMonthName(const int32_t &index, DateTimeDataType type) in GetMonthName() 141 std::string DateTimeFormat::GetAmPmMarker(const int32_t &index, DateTimeDataType type) in GetAmPmMarker() 152 int8_t DateTimeFormat::Get12HourTimeWithoutAmpm(const time_t &cal, const std::string &zoneInfo, in Get12HourTimeWithoutAmpm() 165 std::string DateTimeFormat::FormatElapsedDuration(int32_t milliseconds, ElapsedPatternType type, in FormatElapsedDuration() [all …]
|
/ohos5.0/docs/zh-cn/application-dev/internationalization/ |
H A D | i18n-time-date.md | 26 2. 创建DateTimeFormat对象。 31 …let dateFormat: intl.DateTimeFormat = new intl.DateTimeFormat(locale: string | Array<string>, opti… 32 let dateFormat: intl.DateTimeFormat = new intl.DateTimeFormat(); //不传入locale参数 107 let dateFormat1 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'full', timeStyle: 'full'}); 111 let dateFormat2 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short'}); 115 let dateFormat3 = new intl.DateTimeFormat('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digi… 119 let dateFormat4 = new intl.DateTimeFormat('zh-CN', {month: 'long', day: 'numeric', weekday: 'long' … 123 let dateFormat5 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short', hourCyc… 127 let dateFormat6 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short', numberi… 131 let dataFormat7 = new intl.DateTimeFormat('en-GB'); [all …]
|
H A D | i18n-locale-culture.md | 52 以时间日期格式化为例,[DateTimeFormat](../reference/apis-localization-kit/js-apis-intl.md#datetimeformat)类的详细说… 82 let zhDateTimeFmt = new intl.DateTimeFormat(zhLocale.toString()); 86 let enDateTimeFmt = new intl.DateTimeFormat(enLocale.toString()); 90 let systemDateTimeFmt = new intl.DateTimeFormat(systemLocale.toString());
|
H A D | i18n-user-preferences.md | 34 let dateTimeFmt = new intl.DateTimeFormat(appPreferredLanguage); 48 let dateTimeFmt = new intl.DateTimeFormat(appPreferredLanguage, { timeStyle: "medium" });
|
/ohos5.0/base/global/i18n/frameworks/intl/test/unittest/ |
H A D | intl_test.cpp | 153 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 250 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 279 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 494 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 507 DateTimeFormat *dateFormatH11 = new (std::nothrow) DateTimeFormat(locales, options); 509 DateTimeFormat *dateFormatH12 = new (std::nothrow) DateTimeFormat(locales, options); 570 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 596 DateTimeFormat *dateFormat = new (std::nothrow) DateTimeFormat(locales, options); 1507 DateTimeFormat *formatter = new DateTimeFormat(locales, options); 1549 DateTimeFormat *formatter = new DateTimeFormat(locales, options); [all …]
|
H A D | intl_test_extent.cpp | 692 …std::unique_ptr<DateTimeFormat> defaultFormatter = DateTimeFormat::CreateInstance(locales, default… 698 …std::unique_ptr<DateTimeFormat> dateFormatter = DateTimeFormat::CreateInstance(locales, dateOption… 704 …std::unique_ptr<DateTimeFormat> timeFormatter = DateTimeFormat::CreateInstance(locales, timeOption… 743 …std::unique_ptr<DateTimeFormat> monthFormatter = DateTimeFormat::CreateInstance(locales, monthOpti… 749 …std::unique_ptr<DateTimeFormat> weekdayFormatter = DateTimeFormat::CreateInstance(locales, weekday… 756 …std::unique_ptr<DateTimeFormat> eraFormatter = DateTimeFormat::CreateInstance(locales, eraOptions); 798 …std::unique_ptr<DateTimeFormat> dayPeriodFormatter = DateTimeFormat::CreateInstance(locales, dayPe… 805 std::unique_ptr<DateTimeFormat> timeZoneNameFormatter 806 = DateTimeFormat::CreateInstance(locales, timeZoneNameOptions);
|
/ohos5.0/docs/en/application-dev/internationalization/ |
H A D | i18n-time-date.md | 26 2. Create a **DateTimeFormat** object. 31 …let dateFormat: intl.DateTimeFormat = new intl.DateTimeFormat(locale: string | Array<string>, opti… 32 let dateFormat: intl.DateTimeFormat = new intl.DateTimeFormat(); // Do not pass in the locale. 107 let dateFormat1 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'full', timeStyle: 'full'}); 111 let dateFormat2 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short'}); 115 let dateFormat3 = new intl.DateTimeFormat('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digi… 119 let dateFormat4 = new intl.DateTimeFormat('zh-CN', {month: 'long', day: 'numeric', weekday: 'long' … 123 let dateFormat5 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short', hourCyc… 127 let dateFormat6 = new intl.DateTimeFormat('zh-CN', {dateStyle: 'short', timeStyle: 'short', numberi… 131 let dataFormat7 = new intl.DateTimeFormat('en-GB'); [all …]
|
H A D | i18n-locale-culture.md | 78 …Pass the **Locale** object to the **DateTimeFormat** constructor to create a **DateTimeFormat** cl… 82 let zhDateTimeFmt = new intl.DateTimeFormat(zhLocale.toString()); 86 let enDateTimeFmt = new intl.DateTimeFormat(enLocale.toString()); 90 let systemDateTimeFmt = new intl.DateTimeFormat(systemLocale.toString());
|
H A D | i18n-user-preferences.md | 34 let dateTimeFmt = new intl.DateTimeFormat(appPreferredLanguage); 48 let dateTimeFmt = new intl.DateTimeFormat(appPreferredLanguage, { timeStyle: "medium" });
|
/ohos5.0/base/global/i18n_lite/interfaces/kits/i18n/include/ |
H A D | date_time_format.h | 64 class DateTimeFormat { 74 DateTimeFormat(AvailableDateTimeFormatPattern requestPattern, const LocaleInfo &locale); 82 ~DateTimeFormat();
|
/ohos5.0/base/global/i18n/frameworks/intl/test/fuzztest/datetimeformat_fuzzer/ |
H A D | datetimeformat_fuzzer.cpp | 33 DateTimeFormat dateTimeFormat(localeTags, configs); in DoSomethingInterestingWithMyAPI() 52 std::unique_ptr<DateTimeFormat> dtFormat = in DoSomethingInterestingWithMyAPI() 53 DateTimeFormat::CreateInstance(localeTags, configs); in DoSomethingInterestingWithMyAPI()
|
/ohos5.0/base/global/i18n/frameworks/intl/include/ |
H A D | date_time_format.h | 36 class DateTimeFormat { 38 …DateTimeFormat(const std::vector<std::string> &localeTags, std::map<std::string, std::string> &con… 39 virtual ~DateTimeFormat(); 58 … static std::unique_ptr<DateTimeFormat> CreateInstance(const std::vector<std::string> &localeTags, 128 static std::unordered_map<DateTimeFormat::DefaultStyle, icu::DateFormat::EStyle> DefaultDTStyle;
|
/ohos5.0/docs/zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.51/ |
H A D | changelogs-i18n.md | 111 intl.DateTimeFormat.format 146 intl.DateTimeFormat.formatRange
|
/ohos5.0/base/global/i18n/ |
H A D | README.md | 38 fmt = new Intl.DateTimeFormat('en-US') // Create a DateTimeFormat instance. 39 console.log(fmt.format(date)); // Format the date and time by using the DateTimeFormat instance.
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-localization-kit/ |
H A D | js-apis-intl.md | 220 ## DateTimeFormat section 236 // 使用系统当前locale创建DateTimeFormat对象 237 let datefmt= new intl.DateTimeFormat(); 261 // 使用 "zh-CN" locale创建DateTimeFormat对象,日期风格为full,时间风格为medium 264 // 使用 ["ban", "zh"] locale列表创建DateTimeFormat对象,因为ban为非法LocaleID,因此使用zh Locale创建DateTimeFormat对象 295 // 使用 en-GB locale创建DateTimeFormat对象 296 let datefmt = new intl.DateTimeFormat("en-GB"); 299 // 使用 en-GB locale创建DateTimeFormat对象,dateStyle设置为full,timeStyle设置为medium 333 // 使用 en-GB locale创建DateTimeFormat对象 334 let datefmt = new intl.DateTimeFormat("en-GB"); [all …]
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v2.2-beta2/ |
H A D | js-apidiff-v2.2-beta2.md | 21 | 时间日期数字模块-DateTimeFormat | constructor(locale: string, options?:options) | 新增 | - | 22 | 时间日期数字模块-DateTimeFormat | constructor(locale: string[], options?:options) | 新增 | - | 23 | 时间日期数字模块-DateTimeFormat | resolvedOptions(): DateTimeOptions | 新增 | - | 24 | 时间日期数字模块-DateTimeFormat | format(date: Date): string; | 新增 | - | 25 | 时间日期数字模块-DateTimeFormat | formatRange(fromDate: Date, toDate: Date): string; | 新增 | - |
|
/ohos5.0/base/global/i18n_lite/frameworks/i18n/test/unittest/lite/common/ |
H A D | i18n_test.cpp | 196 DateTimeFormat *formatter = new DateTimeFormat(pattern, locale); 210 DateTimeFormat formatter(pattern, locale); 226 DateTimeFormat formatter(pattern, locale); 244 DateTimeFormat formatter(pattern, locale); 262 DateTimeFormat formatter(pattern, locale); 280 DateTimeFormat formatter(pattern, locale); 299 DateTimeFormat formatter(pattern, locale); 318 DateTimeFormat formatter(pattern, locale); 335 DateTimeFormat formatter(pattern, locale); 353 DateTimeFormat formatter(pattern, locale); [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-localization-kit/ |
H A D | js-apis-intl.md | 220 ## DateTimeFormat section 236 // Use the current system locale to create a DateTimeFormat object. 237 let datefmt= new intl.DateTimeFormat(); 262 let datefmt= new intl.DateTimeFormat("zh-CN", { dateStyle: 'full', timeStyle: 'medium' }); 264 …**, **zh"] to create a DateTimeFormat object. Because ban is an invalid locale ID, locale zh is us… 295 // Use locale en-GB to create a DateTimeFormat object. 296 let datefmt = new intl.DateTimeFormat("en-GB"); 300 datefmt = new intl.DateTimeFormat("en-GB", { dateStyle: 'full', timeStyle: 'medium' }); 333 // Use locale en-GB to create a DateTimeFormat object. 334 let datefmt = new intl.DateTimeFormat("en-GB"); [all …]
|
/ohos5.0/docs/en/release-notes/api-diff/v2.2-beta2/ |
H A D | js-apidiff-v2.2-beta2.md | 21 | Time, date, and digit module - DateTimeFormat | constructor(locale: string, options?:options) … 22 | Time, date, and digit module - DateTimeFormat | constructor(locale: string[], options?:options)… 23 | Time, date, and digit module - DateTimeFormat | resolvedOptions(): DateTimeOptions | Added | … 24 | Time, date, and digit module - DateTimeFormat | format(date: Date): string; | Added | - | 25 | Time, date, and digit module - DateTimeFormat | formatRange(fromDate: Date, toDate: Date): stri…
|
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/ |
H A D | date_time_format_module.h | 171 I18N::DateTimeFormat *dateFormat_;
|
H A D | date_time_format_module.cpp | 129 …dateModel->dateFormat_ = new DateTimeFormat(AvailableDateTimeFormatPattern::SHORT, *dateModel->inf… in CreateDateTimeFormat()
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v4.0-Release to v3.2-Release/ |
H A D | js-apidiff-global.md | 214 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:constructor();<br>旧版本信息:|类名:DateTimeFormat;<br>方法or属性:constr… 257 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:export class DateTimeFormat<br>旧版本信息:|类名:DateTimeFormat;<br>… 258 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:constructor(locale: string \| Array\<string>, options?: Date… 259 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:format(date: Date): string;<br>旧版本信息:|类名:DateTimeFormat;<br>… 260 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:formatRange(startDate: Date, endDate: Date): string;<br>旧版本信… 261 |跨平台能力有变化|类名:DateTimeFormat;<br>方法or属性:resolvedOptions(): DateTimeOptions;<br>旧版本信息:|类名:DateTimeFor…
|
/ohos5.0/base/global/i18n/interfaces/js/kits/include/ |
H A D | intl_addon.h | 122 std::unique_ptr<DateTimeFormat> datefmt_ = nullptr;
|
/ohos5.0/docs/en/release-notes/api-diff/v4.0-Release-vs-v3.2-Release/ |
H A D | js-apidiff-global.md | 214 …hanged|Class name: DateTimeFormat;<br>Method or attribute name: constructor();<br>Old version info… 257 …DateTimeFormat;<br>Method or attribute name: export class DateTimeFormat<br>Old version informatio… 258 …DateTimeFormat;<br>Method or attribute name: constructor(locale: string \| Array\<string>, options… 259 …Class name: DateTimeFormat;<br>Method or attribute name: format(date: Date): string;<br>Old versio… 260 …DateTimeFormat;<br>Method or attribute name: formatRange(startDate: Date, endDate: Date): string;<… 261 …s name: DateTimeFormat;<br>Method or attribute name: resolvedOptions(): DateTimeOptions;<br>Old ve…
|