/arkcompiler/ets_runtime/ecmascript/platform/windows/ |
H A D | time.cpp | 42 int month = nowtm.tm_mon + 1; in IsDst() local 52 if (month > stDSTStart.wMonth && month < stDSTEnd.wMonth) { in IsDst() 54 } else if (month == stDSTStart.wMonth) { in IsDst() 58 } else if (month == stDSTEnd.wMonth) { in IsDst()
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | js_date.cpp | 41 (*date)[DAYS] = (timeMs - (*date)[HOUR]) / MS_PER_DAY; // days from year, month, day in TransferTimeToDate() 113 int64_t month = mp + (mp < MONTH_TRANSFORM[1] ? local 114 MONTH_TRANSFORM[0] : MONTH_TRANSFORM[2]); // transform month to civil system 115 int64_t year = y + (month <= MONTH_COEFFICIENT); 116 month -= 1; 119 (*date)[MONTH] = month; 122 preMonth_ = month; 152 double JSDate::MakeDay(double year, double month, double date) 154 if (std::isfinite(year) && std::isfinite(month) && std::isfinite(date)) { 156 double monthInteger = NumberHelper::TruncateDouble(month); 930 int64_t month = DateUtils::Mod((*date)[MONTH], MONTH_PER_YEAR); SetDateValues() local 947 SetDateValues(int64_t year, int64_t month, int64_t day) SetDateValues() argument [all...] |
H A D | js_relative_time_format.cpp | 182 // 7. If unit is "months" or "month", return "month". in SingularUnitToIcuUnit() 191 JSHandle<EcmaString> month = JSHandle<EcmaString>::Cast(globalConst->GetHandledMonthString()); in SingularUnitToIcuUnit() local 219 } else if (EcmaStringAccessor::StringsAreEqual(*month, *unit) || in SingularUnitToIcuUnit() 271 // 10. If unit is not one of "second", "minute", "hour", "day", "week", "month", "quarter", or "year", throw a in GetIcuFormatted() 306 JSHandle<EcmaString> month = JSHandle<EcmaString>::Cast(globalConst->GetHandledMonthString()); in SingularUnitString() local 338 // 7. If unit is "months" or "month", return "month". in SingularUnitString() 339 if (EcmaStringAccessor::StringsAreEqual(*month, *unit) || EcmaStringAccessor::StringsAreEqual(*months, *unit)) { in SingularUnitString() 340 return month; in SingularUnitString() [all...] |
H A D | date_parse.h | 493 void SetMonth(int month)
in SetMonth() argument 495 month_ = month;
in SetMonth()
|
H A D | js_date.h | 100 static double MakeDay(double year, double month, double date); 167 static double SetDateValues(int64_t year, int64_t month, int64_t day);
|
H A D | object_fast_operator-inl.h | 847 int month = 1; in FastParseDate() local 858 if (!GetNumFromString(data, len, &index, &month)) { in FastParseDate() 864 if (month < 1 || month > JSDate::MONTH_PER_YEAR) { in FastParseDate() 870 double day = JSDate::MakeDay(year, month - 1, date); in FastParseDate()
|
/arkcompiler/ets_runtime/test/moduletest/regress/ |
H A D | regress.js | 232 const datesList = [{ year: '2021', month: '10', day: '22', hour: '10', minute: '12', second: '32' }, 233 { year: '2021', month: '8', day: '3', hour: '9', minute: '9', second: '6' }]; 234 const { year, month, day, hour, minute, second } = datesList[0]; 235 const s0 = `${year}-${month}-${day} ${hour}:${minute}:${second}Z`; 237 const s1 = `${'0'.repeat(i) + year}-${month}-${day} ${hour}:${minute}:${second}Z`;
|
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
H A D | builtins_stubs.h | 81 inline GateRef IsNumberYearMonthDay(GateRef year, GateRef month, GateRef day)
in IsNumberYearMonthDay() argument 83 GateRef condition = BitAnd(TaggedIsNumber(year), TaggedIsNumber(month));
in IsNumberYearMonthDay()
|
H A D | builtins_stubs.cpp | 493 BRANCH(Int64Equal(numArgs, IntPtr(3)), &threeArgs, &slowPath); // 3: year month day
in DECLARE_BUILTINS() 498 GateRef month = GetArgFromArgv(IntPtr(1));
in DECLARE_BUILTINS() local 500 BRANCH(IsNumberYearMonthDay(year, month, day), &numberYearMonthDay, &slowPath);
in DECLARE_BUILTINS() 504 GateRef m = GetDoubleOfTNumber(month);
in DECLARE_BUILTINS()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_date_time_format_second_test.cpp | 91 { "month", "2-digit" }, in FormatDateTimeCommon() 165 auto month = JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>::Cast(dateTimeArray1), 2).GetValue(); in HWTEST_F_L0() local 172 EXPECT_STREQ(GetDateTimePartStringTest(thread, typeKey, month).c_str(), "month"); in HWTEST_F_L0() 173 EXPECT_STREQ(GetDateTimePartStringTest(thread, valueKey, month).c_str(), "5"); in HWTEST_F_L0() 183 auto month = JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>::Cast(dateTimeArray), 2).GetValue(); in CheckOther() local 185 EXPECT_STREQ(GetDateTimePartStringTest(thread, typeKey, month).c_str(), "month"); in CheckOther() 186 EXPECT_STREQ(GetDateTimePartStringTest(thread, valueKey, month).c_str(), "05"); in CheckOther() 247 { "month", " in HWTEST_F_L0() [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
H A D | builtins_date_time_format_first_test.cpp | 56 static double BuiltinsDateCreate(const double year, const double month, const double date) in BuiltinsDateCreate() argument 58 const double day = JSDate::MakeDay(year, month, date); in BuiltinsDateCreate()
|
/arkcompiler/ets_frontend/test/scripts/utils/commit_message/ |
H A D | get_commit_message.py | 160 start_time = datetime(yesterday.year, yesterday.month, yesterday.day, 0, 0, 0)
|
/arkcompiler/ets_runtime/ecmascript/stubs/ |
H A D | runtime_stubs.h | 150 static double SetDateValues(double year, double month, double day);
|
H A D | runtime_stubs.cpp | 3479 double RuntimeStubs::SetDateValues(double year, double month, double day) in SetDateValues() argument 3481 if (std::isnan(year) || !std::isfinite(year) || std::isnan(month) || !std::isfinite(month) || std::isnan(day) || in SetDateValues() 3486 return JSDate::SetDateValues(static_cast<int64_t>(year), static_cast<int64_t>(month), static_cast<int64_t>(day)); in SetDateValues()
|