Home
last modified time | relevance | path

Searched full:date (Results 1 – 25 of 302) sorted by relevance

12345678910>>...13

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/time/
DDateChangeTest.sts19 failures += test(testDateChangeYear(), "Try to change date's year");
20 failures += test(testDateChangeMonth(), "Try to change date's month");
21 failures += test(testDateChangeDay(), "Try to set date's new day");
42 let date: Date = new Date();
43 let year = date.getFullYear();
44 date.setFullYear(year - 1);
46 if(date.getFullYear() == (year - 1)) return 0;
52 let tmp = new Date(year, month + 1, 0);
56 function testDateChangeMonthImpl(date: Date, change: int) {
57 let month = date.getMonth();
[all …]
DDateCtorTypes.sts36 let cd = new Date(intYears[i] as long);
37 let cd1 = new Date(intYears[i]);
41 let cd = new Date(intMonths[i] as long);
42 let cd1 = new Date(intMonths[i]);
46 let cd = new Date(intHours[i] as long);
47 let cd1 = new Date(intHours[i]);
51 let cd = new Date(intMinutes[i] as long);
52 let cd1 = new Date(intMinutes[i]);
59 let cd = new Date(doubleYears[i] as double);
60 let cd1 = new Date(doubleYears[i]);
[all …]
DDateConstructorTest.sts36 failures += test(testDateConstructor(), "Test constructor with Date object")
68 let cd = new Date(longYears[i]);
86 let cd = new Date(longYears[i], md[i]);
87 let utc = Date.UTC(longYears[i], md[i]);
106 let cd = new Date(longYears[i], md[i], day);
107 let utc = Date.UTC(longYears[i], md[i], day);
127 let cd = new Date(longYears[i], md[i], day, ht[i]);
128 let utc = Date.UTC(longYears[i], md[i], day, ht[i]);
149 let cd = new Date(longYears[i], md[i], day, ht[i], mh[i]);
150 let utc = Date.UTC(longYears[i], md[i], day, ht[i], mh[i]);
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_date.h22 // List of functions in Date, excluding the '@@' properties.
24 // where BuiltinsDate::func refers to the native implementation of Date[name].
27 … /* Date.now ( ) */ \
29 … /* Date.parse ( string ) */ \
31 … /* Date.UTC ( year [ , month [ , date [ , hours [ , minutes [ , seconds [ , ms ] ] ] ] ] ] ) */ \
34 // List of functions in Date.prototype, excluding the constructor and '@@' properties.
36 // where BuiltinsDate::func refers to the native implementation of Date.prototype[name].
38 /* Date.prototype.getDate ( ) */ \
40 /* Date.prototype.getDay ( ) */ \
42 /* Date.prototype.getFullYear ( ) */ \
[all …]
/arkcompiler/ets_frontend/test262/
Dignored-test262-other-release-qemu-aot-pgo.txt2 test262/data/other_tests/built-ins/Date/UTC/fp-evaluation-order.js
5 test262/data/other_tests/built-ins/Date/prototype/setDate/this-value-invalid-date.js
6 test262/data/other_tests/built-ins/Date/prototype/setHours/this-value-invalid-date.js
7 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/this-value-invalid-date.js
8 test262/data/other_tests/built-ins/Date/prototype/setMinutes/arg-coercion-order.js
9 test262/data/other_tests/built-ins/Date/prototype/setMinutes/this-value-invalid-date.js
10 test262/data/other_tests/built-ins/Date/prototype/setMonth/arg-coercion-order.js
11 test262/data/other_tests/built-ins/Date/prototype/setMonth/this-value-invalid-date.js
12 test262/data/other_tests/built-ins/Date/prototype/setSeconds/this-value-invalid-date.js
16 test262/data/other_tests/built-ins/Date/prototype/setDate/arg-coercion-order.js
[all …]
Dignored-test262-other-release-qemu-aot-pgo-litecg.txt2 test262/data/other_tests/built-ins/Date/UTC/fp-evaluation-order.js
5 test262/data/other_tests/built-ins/Date/prototype/setDate/arg-coercion-order.js
6 test262/data/other_tests/built-ins/Date/prototype/setHours/arg-coercion-order.js
7 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/arg-coercion-order.js
8 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/this-value-invalid-date.js
9 test262/data/other_tests/built-ins/Date/prototype/setMinutes/arg-coercion-order.js
10 test262/data/other_tests/built-ins/Date/prototype/setMonth/arg-coercion-order.js
11 test262/data/other_tests/built-ins/Date/prototype/setSeconds/arg-coercion-order.js
12 test262/data/other_tests/built-ins/Date/prototype/setSeconds/this-value-invalid-date.js
13 test262/data/other_tests/built-ins/Date/prototype/setUTCDate/arg-coercion-order.js
[all …]
Dignored-test262-other-fastverify-qemu-int.txt27 test262/data/other_tests/built-ins/Date/UTC/fp-evaluation-order.js
30 test262/data/other_tests/built-ins/Date/prototype/setDate/arg-coercion-order.js
31 test262/data/other_tests/built-ins/Date/prototype/setHours/arg-coercion-order.js
32 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/arg-coercion-order.js
33 test262/data/other_tests/built-ins/Date/prototype/setMinutes/arg-coercion-order.js
34 test262/data/other_tests/built-ins/Date/prototype/setMonth/arg-coercion-order.js
35 test262/data/other_tests/built-ins/Date/prototype/setMonth/this-value-invalid-date.js
36 test262/data/other_tests/built-ins/Date/prototype/setSeconds/arg-coercion-order.js
37 test262/data/other_tests/built-ins/Date/prototype/setSeconds/this-value-invalid-date.js
38 test262/data/other_tests/built-ins/Date/prototype/setUTCDate/arg-coercion-order.js
[all …]
Dignored-test262-other-fastverify-qemu-aot-pgo.txt29 test262/data/other_tests/built-ins/Date/UTC/fp-evaluation-order.js
32 test262/data/other_tests/built-ins/Date/prototype/setDate/arg-coercion-order.js
33 test262/data/other_tests/built-ins/Date/prototype/setHours/arg-coercion-order.js
34 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/arg-coercion-order.js
35 test262/data/other_tests/built-ins/Date/prototype/setMinutes/arg-coercion-order.js
36 test262/data/other_tests/built-ins/Date/prototype/setMinutes/this-value-invalid-date.js
37 test262/data/other_tests/built-ins/Date/prototype/setMonth/this-value-invalid-date.js
38 test262/data/other_tests/built-ins/Date/prototype/setSeconds/arg-coercion-order.js
39 test262/data/other_tests/built-ins/Date/prototype/setSeconds/this-value-invalid-date.js
40 test262/data/other_tests/built-ins/Date/prototype/setUTCDate/arg-coercion-order.js
[all …]
Dignored-test262-other-fastverify-qemu-aot-pgo-litecg.txt40 test262/data/other_tests/built-ins/Date/UTC/fp-evaluation-order.js
43 test262/data/other_tests/built-ins/Date/prototype/setDate/arg-coercion-order.js
44 test262/data/other_tests/built-ins/Date/prototype/setHours/arg-coercion-order.js
45 test262/data/other_tests/built-ins/Date/prototype/setMilliseconds/arg-coercion-order.js
46 test262/data/other_tests/built-ins/Date/prototype/setMinutes/arg-coercion-order.js
47 test262/data/other_tests/built-ins/Date/prototype/setMonth/arg-coercion-order.js
48 test262/data/other_tests/built-ins/Date/prototype/setMonth/this-value-invalid-date.js
49 test262/data/other_tests/built-ins/Date/prototype/setSeconds/arg-coercion-order.js
50 test262/data/other_tests/built-ins/Date/prototype/setUTCDate/arg-coercion-order.js
51 test262/data/other_tests/built-ins/Date/prototype/setUTCHours/arg-coercion-order.js
[all …]
Dother_tests_part1_1.txt1117 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-default-first-invalid.js
1118 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/called-as-function.js
1119 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-default-first-non-callable.js
1120 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-default-first-valid.js
1121 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-default-no-callables.js
1122 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-invalid.js
1123 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-number-first-invalid.js
1124 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-number-first-non-callable.js
1125 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-number-first-valid.js
1126 test262/data/test/built-ins/Date/prototype/Symbol.toPrimitive/hint-number-no-callables.js
[all …]
/arkcompiler/ets_runtime/test/perform/string/
Dstring.js18 const time1 = Date.now()
22 const time2 = Date.now()
31 const time1 = Date.now()
35 const time2 = Date.now()
44 const time1 = Date.now()
48 const time2 = Date.now()
55 const time1 = Date.now()
59 const time2 = Date.now()
66 const time1 = Date.now()
70 const time2 = Date.now()
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/date/Now/
DbuiltinDateNow.ts27 return Date.now(x);
31 return Date.now();
49 //aot: [trace] aot inline builtin: Date.now, caller function name:func_main_0@builtinDateNow
50 print(Date.now()); //: __INT__
58 //aot: [trace] aot inline builtin: Date.now, caller function name:func_main_0@builtinDateNow
59 print(Date.now()); //: __INT_MORE_PREV__
65 //aot: [trace] aot inline builtin: Date.now, caller function name:func_main_0@builtinDateNow
66 print(Date.now(0)); //: __INT__
67 //aot: [trace] aot inline builtin: Date.now, caller function name:func_main_0@builtinDateNow
68 print(Date.now(1, 2)); //: __INT__
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_es_checked/
Ddate.yaml14 category: Date
16 - expr: new Date(pars).getTimezoneOffset()
24 - expr: new Date(pars).valueOf()
32 - expr: new Date(pars).getFullYear()
35 - expr: new Date(pars).getMonth()
38 - expr: new Date(pars).getDate()
41 - expr: new Date(pars).getDay()
44 - expr: new Date(pars).getHours()
47 - expr: new Date(pars).getMinutes()
50 - expr: new Date(pars).getSeconds()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/
DDate.sts18 // TODO To offer protection against timing attacks and fingerprinting, the precision of `Date.getTi…
19 // `Date.now()` might get rounded depending on browser (target) settings.
165 * @returns Date number (within month).
300 * @param date
304 function ecmaMakeDay(year: long, month: long, date: long): long {
312 …DayFromYear(ym) as long + getFirstDayInMonth(ecmaInLeapYear(ym), mn) as long + (date as long) - 1);
402 * Date JS API-compatible class
404 export final class Date {
405 /** Stored value of Date, milliseconds */
410 * The `parseDateFromString()` static method parses a string representation of a date,
[all …]
/arkcompiler/ets_runtime/test/aottest/builtin_inlining/date/GetTime/
DbuiltinDateGetTime.ts48 let time = new Date('July 20, 99 20:17:40 GMT+00:00')
49 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
52 time = new Date(990000000000)
53 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
55 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
59 time = new Date(1990, 2, 15, 16, 17, 18);
60 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
62 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
64 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
66 //aot: [trace] aot inline builtin: Date.prototype.getTime, caller function name:func_main_0@builtin…
[all …]
/arkcompiler/ets_runtime/test/perform/number/
Dnumber.js17 let start = Date.now();
22 let end = Date.now();
29 let start = Date.now();
34 let end = Date.now();
41 let start = Date.now();
46 let end = Date.now();
54 const time1 = Date.now()
58 const time2 = Date.now()
64 let start = Date.now();
69 let end = Date.now();
[all …]
/arkcompiler/ets_frontend/ets2panda/test/parser/ets/
Dglobal_const_vars3.sts17 const dae: Date = new Date();
20 public readonly date: Date;
23 this.date = new Date();
/arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/
Dglobal_const_vars4.sts17 public readonly /* @@ label */date: Date = new Date();
24 this.date = new Date();
30 /* @@@ label Error TypeError: Cannot assign to a readonly variable date */
/arkcompiler/ets_runtime/test/moduletest/datecase/
Ddatecase.js18 * @tc.desc:test date
22 var d1 = new Date(2022, 0, 1);
23 var d2 = new Date(2022, 1, 2);
24 var d3 = new Date(2022, 2, 3);
25 var d4 = new Date(2022, 3, 4);
26 var d5 = new Date(1677628800000);
27 var d6 = new Date(1680278400000);
29 var d9 = new Date(1970, 1, 1);
30 var d10 = new Date(2022, 2, 26, 23, 59); // dst become effective in GMT+02:00
/arkcompiler/ets_runtime/test/moduletest/dateparse/
Ddateparse.js18 * @tc.desc:test date
22 var d1 = new Date("2023-02-19T11:13:48.132Z");
23 var d2 = new Date("Thu Nov 19 2020 20:18:18 GMT");
24 var d3 = new Date("Thu, 21 Nov 2023 13:23:26 GMT");
25 var d4 = new Date("2021-12-25 03:25:45.476Z");
26 var d5 = new Date("January 13,2016 22:19:35 GMT");
51 let d6 = new Date("Wed, 26-Jun-19 GMT")
53 let d7 = new Date("Wed, 26-Jun-2019 GMT")
55 let date8=new Date('Jun,19 12:03:45 GMT')
/arkcompiler/ets_runtime/ecmascript/
Djs_date.cpp30 void DateUtils::TransferTimeToDate(int64_t timeMs, std::array<int64_t, DATE_LENGTH> *date) in TransferTimeToDate() argument
32 …(*date)[HOUR] = Mod(timeMs, MS_PER_DAY); // ms from hour, minutes,… in TransferTimeToDate()
33 …(*date)[DAYS] = (timeMs - (*date)[HOUR]) / MS_PER_DAY; // days from year, month,… in TransferTimeToDate()
34 (*date)[MS] = (*date)[HOUR] % MS_PER_SECOND; // ms in TransferTimeToDate()
35 …(*date)[HOUR] = ((*date)[HOUR] - (*date)[MS]) / MS_PER_SECOND; // s from hour, minutes, … in TransferTimeToDate()
36 (*date)[SEC] = (*date)[HOUR] % SEC_PER_MINUTE; // second in TransferTimeToDate()
37 … (*date)[HOUR] = ((*date)[HOUR] - (*date)[SEC]) / SEC_PER_MINUTE; // min from hour, minutes in TransferTimeToDate()
38 (*date)[MIN] = (*date)[HOUR] % SEC_PER_MINUTE; // min in TransferTimeToDate()
39 (*date)[HOUR] = ((*date)[HOUR] - (*date)[MIN]) / SEC_PER_MINUTE; // hour in TransferTimeToDate()
40 (*date)[WEEKDAY] = Mod(((*date)[DAYS] + LEAP_NUMBER[0]), DAY_PER_WEEK); // weekday in TransferTimeToDate()
[all …]
/arkcompiler/ets_runtime/test/moduletest/datecompare/
Ddatecompare.js18 * @tc.desc:test date
22 var str1 = Date.parse('08/04/2011')
23 var str2 = Date.parse('2010-08-04')
25 var timer1 = new Date(str1)
26 var timer2 = new Date(str2)
/arkcompiler/ets_frontend/arkguard/test/grammar/interface_validation/
Dinterface_class_method.ts19 currentTime: Date;
21 setTime(d: Date);
25 currentTime: Date;
27 setTime(d: Date) {
37 let now = Date.prototype;
/arkcompiler/ets_runtime/test/moduletest/builtins/
Dbuiltinsir.js26 print(str1.charCodeAt(new Date()));
58 a.foo = Date;
63 date: Date, property
72 obj.date(0);
73 obj.date(0, 1);
74 obj.date(0, 1, 2);
75 obj.date(0, 1, 2, 3);
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/timer/
Dtimer_tests.sts71 let start = Date.now();
73 …// To get time Date.now and libuv uses clock_gettime under the hood, but with different parameters…
74 …ime interval there may be an error. For example time interval measured by Date.now may be 5.9ms ro…
77 let spentTime = Date.now() - start + 1;
103 let start = Date.now();
106 …// To get time Date.now and libuv uses clock_gettime under the hood, but with different parameters…
107 …ime interval there may be an error. For example time interval measured by Date.now may be 5.9ms ro…
110 let spentTime = Date.now() - start + 1;

12345678910>>...13