Home
last modified time | relevance | path

Searched refs:dateTime (Results 1 - 24 of 24) sorted by relevance

/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/test/unittest/common/
H A Ddate_time_module_tdd_test.cpp53 char* DateTimeModuleTddTest::FormatDate(const jerry_value_t dateTime, in FormatDate() argument
57 EXPECT_FALSE(IS_UNDEFINED(dateTime)); in FormatDate()
58 jerry_value_t format = jerryx_get_property_str(dateTime, "format"); in FormatDate()
60 jerry_value_t result = CallJSFunction(format, dateTime, args, argsNum); in FormatDate()
79 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US');"); in HWTEST_F() local
87 char* formatRes = FormatDate(dateTime, args, 1); in HWTEST_F()
88 jerry_release_value(dateTime); in HWTEST_F()
96 dateTime = RunJs("new Intl.DateTimeFormat('zh-CN')"); in HWTEST_F()
101 formatRes = FormatDate(dateTime, args, 1); in HWTEST_F()
104 ReleaseJerryValue(dateTime, arg in HWTEST_F()
120 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en')"); HWTEST_F() local
163 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
244 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
326 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
408 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
490 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
568 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
646 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {hour:'numeric', minute:'numeric'});"); HWTEST_F() local
722 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {hour:'numeric', second:'numeric'});"); HWTEST_F() local
767 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {weekday:'1111'});"); HWTEST_F() local
821 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {year:'short'});"); HWTEST_F() local
879 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {month:1111});"); HWTEST_F() local
936 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {day: 11111})"); HWTEST_F() local
993 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {hour:1111});"); HWTEST_F() local
1050 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {minute:1111});"); HWTEST_F() local
1106 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {second:1111});"); HWTEST_F() local
1159 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('zh-Hans-HK');"); HWTEST_F() local
1217 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {year:'numeric', month:'long', day:'numeric'});"); HWTEST_F() local
1293 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {year:'numeric', month:'long', day:'2-digit'});"); HWTEST_F() local
1369 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {year:'2-digit', month:'long', day:'numeric'});"); HWTEST_F() local
1445 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {year:'2-digit', month:'long', day:'2-digit'});"); HWTEST_F() local
1522 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
1607 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
1691 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
1776 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
1861 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
1944 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
2027 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
2111 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US'," HWTEST_F() local
2195 jerry_value_t dateTime = RunJs("new Intl.DateTimeFormat('en-US', {weekday:'short', year:'2-digit'," HWTEST_F() local
[all...]
H A Ddate_time_module_tdd_test.h108 char* FormatDate(const jerry_value_t dateTime, const jerry_value_t args[], const jerry_length_t argsNum);
/foundation/arkui/ace_engine/frameworks/core/components/text_clock/
H A Drender_text_clock.cpp117 DateTime dateTime; in GetDateTime() local
118 dateTime.year = static_cast<uint32_t>(local->tm_year + BASE_YEAR); in GetDateTime()
119 dateTime.month = static_cast<uint32_t>(local->tm_mon); in GetDateTime()
120 dateTime.day = static_cast<uint32_t>(local->tm_mday); in GetDateTime()
122 dateTime.hour = static_cast<uint32_t>(timeOfNow.hour24_); in GetDateTime()
123 dateTime.minute = static_cast<uint32_t>(timeOfNow.minute_); in GetDateTime()
124 dateTime.second = static_cast<uint32_t>(timeOfNow.second_); in GetDateTime()
125 return dateTime; in GetDateTime()
130 DateTime dateTime = GetDateTime(); in GetFormatDateTime() local
131 std::string time = Localization::GetInstance()->FormatDateTime(dateTime, forma in GetFormatDateTime()
[all...]
/foundation/arkui/ace_engine/frameworks/base/utils/
H A Ddate_util.cpp79 int64_t Date::GetMilliSecondsByDateTime(std::tm& dateTime) in GetMilliSecondsByDateTime() argument
84 if (dateTime.tm_year == 0) { in GetMilliSecondsByDateTime()
85 dateTime.tm_year = local->tm_year; in GetMilliSecondsByDateTime()
87 if (dateTime.tm_mday == 0) { in GetMilliSecondsByDateTime()
88 dateTime.tm_mday = local->tm_mday; in GetMilliSecondsByDateTime()
90 auto timestamp = std::chrono::system_clock::from_time_t(std::mktime(&dateTime)); in GetMilliSecondsByDateTime()
H A Ddate_util.h33 static int64_t GetMilliSecondsByDateTime(std::tm& dateTime);
/foundation/arkui/ace_engine/frameworks/core/components/picker/
H A Dpicker_datetime_component.cpp65 PickerDateTime dateTime(date, GetSelectedTime()); in GetSelectedObject()
66 return dateTime.ToString(true, status); in GetSelectedObject()
177 DateTime dateTime; in GetMonthDayFormatString() local
178 dateTime.year = outDate.GetYear(); in GetMonthDayFormatString()
179 dateTime.month = outDate.GetMonth() ? outDate.GetMonth() - 1 : 0; // W3C's month start from 0 to 11 in GetMonthDayFormatString()
180 dateTime.day = outDate.GetDay(); in GetMonthDayFormatString()
181 return Localization::GetInstance()->FormatDateTime(dateTime, "MMMd"); in GetMonthDayFormatString()
H A Dpicker_data.cpp164 PickerDateTime dateTime; in Current() local
165 dateTime.SetDate(PickerDate::Current()); in Current()
166 dateTime.SetTime(PickerTime::Current()); in Current()
167 return dateTime; in Current()
/foundation/arkui/ace_engine/frameworks/base/log/
H A Dace_performance_check.cpp119 DateTime dateTime; in GetCurrentTime() local
120 dateTime.year = static_cast<uint32_t>(local->tm_year + BASE_YEAR); in GetCurrentTime()
121 dateTime.month = static_cast<uint32_t>(local->tm_mon); in GetCurrentTime()
122 dateTime.day = static_cast<uint32_t>(local->tm_mday); in GetCurrentTime()
123 dateTime.hour = static_cast<uint32_t>(local->tm_hour); in GetCurrentTime()
124 dateTime.minute = static_cast<uint32_t>(local->tm_min); in GetCurrentTime()
125 dateTime.second = static_cast<uint32_t>(local->tm_sec); in GetCurrentTime()
126 auto time = Localization::GetInstance()->FormatDateTime(dateTime, DATE_FORMAT); in GetCurrentTime()
/foundation/arkui/ace_engine/frameworks/core/components/calendar/
H A Dcalendar_component.cpp273 DateTime dateTime; in UpdateTitle() local
274 dateTime.year = today.month.year; in UpdateTitle()
275 dateTime.month = today.month.month; in UpdateTitle()
276 auto date = Localization::GetInstance()->FormatDateTime(dateTime, "yyyyMMM"); in UpdateTitle()
366 DateTime dateTime; in BuildCardCalendarTitle() local
367 dateTime.year = calendarController_->GetCurrentMonth().year; in BuildCardCalendarTitle()
368 dateTime.month = calendarController_->GetCurrentMonth().month; in BuildCardCalendarTitle()
369 auto date = Localization::GetInstance()->FormatDateTime(dateTime, "yyyyMMM"); in BuildCardCalendarTitle()
H A Drender_calendar.cpp91 DateTime dateTime; in UpdateAccessibility() local
92 dateTime.year = static_cast<uint32_t>(today.month.year); in UpdateAccessibility()
93 dateTime.month = static_cast<uint32_t>(today.month.month); in UpdateAccessibility()
94 dateTime.day = static_cast<uint32_t>(today.day); in UpdateAccessibility()
95 auto dateText = Localization::GetInstance()->FormatDateTime(dateTime, "yyyyMMdd"); in UpdateAccessibility()
H A Dcalendar_element.cpp121 DateTime dateTime; in RegisterChangeEndListener()
122 dateTime.year = currentDate.year < 0 ? 0 : static_cast<uint32_t>(currentDate.year); in RegisterChangeEndListener()
123 dateTime.month = currentDate.month < 0 ? 0 : static_cast<uint32_t>(currentDate.month); in RegisterChangeEndListener()
124 auto date = Localization::GetInstance()->FormatDateTime(dateTime, "yyyyMMM"); in RegisterChangeEndListener()
/foundation/arkui/ace_engine/frameworks/base/i18n/
H A Dlocalization.cpp297 const std::string Localization::FormatDateTime(DateTime dateTime, const std::string& format) in FormatDateTime() argument
303 cal->set(dateTime.year, dateTime.month, dateTime.day, dateTime.hour, dateTime.minute, dateTime.second); in FormatDateTime()
451 const std::string Localization::FormatDateTime(DateTime dateTime, DateTimeStyle dateStyle, DateTimeStyle timeStyle) in FormatDateTime() argument
457 cal->set(dateTime.year, dateTime in FormatDateTime()
[all...]
H A Dlocalization.h156 * @param dateTime The value of date time.
160 const std::string FormatDateTime(DateTime dateTime, const std::string& format);
164 * @param dateTime The value of date time.
169 const std::string FormatDateTime(DateTime dateTime, DateTimeStyle dateStyle, DateTimeStyle timeStyle);
/foundation/arkui/ace_engine/test/mock/base/
H A Dmock_localization.cpp66 const std::string Localization::FormatDateTime(DateTime dateTime, const std::string& format) in FormatDateTime() argument
71 const std::string Localization::FormatDateTime(DateTime dateTime, DateTimeStyle dateStyle, DateTimeStyle timeStyle) in FormatDateTime() argument
/foundation/communication/netstack/frameworks/cj/http/src/
H A Dnet_http_cache_strategy.cpp113 int64_t dateTime = std::max<int64_t>(0, cacheResponse_.GetDate()); in CacheResponseAgeMillis() local
119 static_cast<long long>(age), static_cast<long long>(dateTime), static_cast<long long>(nowTime), in CacheResponseAgeMillis()
122 int64_t apparentAge = std::max<int64_t>(0, responseTime - dateTime); in CacheResponseAgeMillis()
/foundation/communication/netstack/frameworks/js/napi/http/cache/cache_strategy/src/
H A Dhttp_cache_strategy.cpp115 int64_t dateTime = std::max<int64_t>(0, cacheResponse_.GetDate()); in CacheResponseAgeMillis() local
121 static_cast<long long>(age), static_cast<long long>(dateTime), static_cast<long long>(nowTime), in CacheResponseAgeMillis()
124 int64_t apparentAge = std::max<int64_t>(0, responseTime - dateTime); in CacheResponseAgeMillis()
/foundation/arkui/ace_engine/frameworks/core/components/refresh/
H A Drender_refresh.cpp557 DateTime dateTime; in GetFormatDateTime() local
558 dateTime.year = static_cast<uint32_t>(local->tm_year + BASE_YEAR); in GetFormatDateTime()
559 dateTime.month = static_cast<uint32_t>(local->tm_mon); in GetFormatDateTime()
560 dateTime.day = static_cast<uint32_t>(local->tm_mday); in GetFormatDateTime()
561 dateTime.hour = static_cast<uint32_t>(local->tm_hour); in GetFormatDateTime()
562 dateTime.minute = static_cast<uint32_t>(local->tm_min); in GetFormatDateTime()
563 std::string time = Localization::GetInstance()->FormatDateTime(dateTime, LAST_UPDATE_FORMAT); in GetFormatDateTime()
/foundation/arkui/ace_engine/test/unittest/base/
H A Dbase_utils_test.cpp1277 std::tm dateTime; in HWTEST_F() local
1278 Date::GetMilliSecondsByDateTime(dateTime); in HWTEST_F()
1279 EXPECT_EQ(dateTime.tm_year != 0, true); in HWTEST_F()
1280 EXPECT_EQ(dateTime.tm_mday != 0, true); in HWTEST_F()
1281 dateTime.tm_mday = 5; in HWTEST_F()
1282 Date::GetMilliSecondsByDateTime(dateTime); in HWTEST_F()
1283 EXPECT_EQ(dateTime.tm_year != 0, true); in HWTEST_F()
1284 EXPECT_EQ(dateTime.tm_mday == 5, true); in HWTEST_F()
1285 dateTime.tm_year = 8; in HWTEST_F()
1286 Date::GetMilliSecondsByDateTime(dateTime); in HWTEST_F()
[all...]
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/
H A Ddate_time_format_module.cpp182 time_t dateTime = static_cast<time_t>(formatter->GetTimeVal(args[0], "getTime") / msToSec); in Format() local
183 formatter->ConvertLocalToGMT(dateTime); in Format()
193 formatter->FormatDate(dateTime, res, maxSize, start); in Format()
196 formatter->FormatTime(dateTime, res, maxSize, start); in Format()
215 formatter->dateFormat_->Format(dateTime, timeZone, result, status); in Format()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_clock/
H A Dtext_clock_pattern.cpp326 DateTime dateTime; // This is for i18n date time. in GetCurrentFormatDateTime() local
327 dateTime.year =static_cast<uint32_t>(timeZoneTime->tm_year + BASE_YEAR); in GetCurrentFormatDateTime()
328 dateTime.month = static_cast<uint32_t>(timeZoneTime->tm_mon); in GetCurrentFormatDateTime()
329 dateTime.day = static_cast<uint32_t>(timeZoneTime->tm_mday); in GetCurrentFormatDateTime()
330 dateTime.hour = static_cast<uint32_t>(timeZoneTime->tm_hour); in GetCurrentFormatDateTime()
331 dateTime.minute = static_cast<uint32_t>(timeZoneTime->tm_min); in GetCurrentFormatDateTime()
332 dateTime.second = static_cast<uint32_t>(timeZoneTime->tm_sec); in GetCurrentFormatDateTime()
334 return Localization::GetInstance()->FormatDateTime(dateTime, GetFormat()); in GetCurrentFormatDateTime()
336 dateTime.week = static_cast<uint32_t>(timeZoneTime->tm_wday); // 0-6 in GetCurrentFormatDateTime()
/foundation/multimedia/image_effect/frameworks/native/utils/common/
H A Dcommon_utils.cpp400 std::string dateTime; in PrintImageExifInfo() local
401 exifMetadata->GetValue(DATE_TIME, dateTime); in PrintImageExifInfo()
407 EFFECT_LOGD("%{public}s: width=%{public}d, length=%{public}d, dateTime=%{public}s, xDimension=%{public}d, " in PrintImageExifInfo()
408 "yDimension=%{public}d", tag.c_str(), width, length, dateTime.c_str(), xDimension, yDimension); in PrintImageExifInfo()
415 std::string dateTime; in UpdateExifDataTime() local
416 if (exifMetadata->GetValue(DATE_TIME, dateTime) != 0 || dateTime.empty()) { in UpdateExifDataTime()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
H A Djs_calendar_picker.cpp164 std::tm dateTime = { 0 }; in GetMSByDate() local
167 dateTime.tm_year = year->GetInt() - 1900; // local date start from 1900 in GetMSByDate()
171 dateTime.tm_mon = month->GetInt() - 1; in GetMSByDate()
175 dateTime.tm_mday = day->GetInt(); in GetMSByDate()
180 dateTime.tm_hour = local->tm_hour; in GetMSByDate()
181 dateTime.tm_min = local->tm_min; in GetMSByDate()
182 dateTime.tm_sec = local->tm_sec; in GetMSByDate()
183 return Date::GetMilliSecondsByDateTime(dateTime); in GetMSByDate()
H A Djs_datepicker.cpp868 std::tm dateTime = { 0 }; in GetDateObj() local
871 dateTime.tm_year = year->GetInt() - 1900; // local date start from 1900 in GetDateObj()
875 dateTime.tm_mon = month->GetInt(); in GetDateObj()
879 dateTime.tm_mday = day->GetInt(); in GetDateObj()
883 dateTime.tm_hour = hour->GetInt(); in GetDateObj()
887 dateTime.tm_min = minute->GetInt(); in GetDateObj()
891 dateTime.tm_sec = second->GetInt(); in GetDateObj()
894 auto milliseconds = Date::GetMilliSecondsByDateTime(dateTime); in GetDateObj()
898 auto timestamp = std::chrono::system_clock::from_time_t(std::mktime(&dateTime)); in GetDateObj()
/foundation/arkui/ace_engine/frameworks/bridge/common/dom/
H A Ddom_picker_base.cpp666 auto dateTime = PickerDateTime::Current(); in SetDateTimeSelected() local
667 if (GetPickerDateTime(value, dateTime)) { in SetDateTimeSelected()
668 picker->SetSelectedDateTime(dateTime); in SetDateTimeSelected()

Completed in 30 milliseconds