mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 04:54:44 +02:00
Temporal: Test tiebreaker rounding modes more thoroughly
The "half___" modes all round to the nearest increment except when there is a tie. The previous tests didn't test rounding in the case of any ties (except for .toString()) so here we use some different numbers in which there is a tie, in order to make tests where the "half___" modes are more thoroughly tested. See https://github.com/tc39/proposal-temporal/pull/2262 which added new rounding modes from NumberFormat V3.
This commit is contained in:
parent
c84e5701cd
commit
8565eea8be
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 31], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 31], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 21], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 21], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -123]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -123]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -500]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 988], [-5, -6, -7, -9, -16, -30, -20, -123, -987]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 31], [-5, -6, -7, -9, -16, -31]],
|
["minutes", [5, 6, 7, 9, 16, 31], [-5, -6, -7, -9, -16, -31]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 21], [-5, -6, -7, -9, -16, -30, -21]],
|
["seconds", [5, 6, 7, 9, 16, 30, 21], [-5, -6, -7, -9, -16, -30, -21]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 988], [-5, -6, -7, -9, -16, -30, -20, -123, -988]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -31]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -31]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -21]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -21]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 123], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 123], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -988]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 988], [-5, -6, -7, -9, -16, -30, -20, -123, -987]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 988], [-5, -6, -7, -9, -16, -30, -20, -123, -988]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 988], [-5, -6, -7, -9, -16, -30, -20, -123, -988]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -988]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 124], [-5, -6, -7, -9, -16, -30, -20, -124]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 501], [-5, -6, -7, -9, -16, -30, -20, -123, -501]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -987]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 500, 987);
|
const instance = new Temporal.Duration(5, 6, 7, 8, 40, 30, 20, 123, 987, 500);
|
||||||
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
const relativeTo = new Temporal.PlainDate(2020, 1, 1);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
["minutes", [5, 6, 7, 9, 16, 30], [-5, -6, -7, -9, -16, -30]],
|
||||||
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
["seconds", [5, 6, 7, 9, 16, 30, 20], [-5, -6, -7, -9, -16, -30, -20]],
|
||||||
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 123], [-5, -6, -7, -9, -16, -30, -20, -123]],
|
["milliseconds", [5, 6, 7, 9, 16, 30, 20, 123], [-5, -6, -7, -9, -16, -30, -20, -123]],
|
||||||
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -500]],
|
["microseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -987]],
|
||||||
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 500, 987], [-5, -6, -7, -9, -16, -30, -20, -123, -500, -987]],
|
["nanoseconds", [5, 6, 7, 9, 16, 30, 20, 123, 987, 500], [-5, -6, -7, -9, -16, -30, -20, -123, -987, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "ceil".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217177200_000_000_000n /* 1976-11-18T15:00:00Z */],
|
["hour", 217177200_000_000_000n /* 1976-11-18T15:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175011_000_000_000n /* 1976-11-18T14:23:31Z */],
|
["second", 217175011_000_000_000n /* 1976-11-18T14:23:31Z */],
|
||||||
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T14:23:30.123988Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "expand".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217177200_000_000_000n /* 1976-11-18T15:00:00Z */],
|
["hour", 217177200_000_000_000n /* 1976-11-18T15:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175011_000_000_000n /* 1976-11-18T14:23:31Z */],
|
["second", 217175011_000_000_000n /* 1976-11-18T14:23:31Z */],
|
||||||
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T14:23:30.123988Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "floor".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217174980_000_000_000n /* 1976-11-18T14:23:00Z */],
|
["minute", 217174980_000_000_000n /* 1976-11-18T14:23:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
||||||
["microsecond", 217175010_123_456_000n /* 1976-11-18T14:23:30.123456Z */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T14:23:30.123987Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfCeil".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T14:23:30.123988Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfEven".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T14:23:30.123988Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfExpand".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T14:23:30.123988Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfFloor".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T14:23:30.123987Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfTrunc".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T14:24:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T14:23:30.124Z */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T14:23:30.123457Z */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T14:23:30.123987Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "trunc".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.Instant(217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */);
|
const instance = new Temporal.Instant(217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
["hour", 217173600_000_000_000n /* 1976-11-18T14:00:00Z */],
|
||||||
["minute", 217174980_000_000_000n /* 1976-11-18T14:23:00Z */],
|
["minute", 217174980_000_000_000n /* 1976-11-18T14:23:00Z */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
["second", 217175010_000_000_000n /* 1976-11-18T14:23:30Z */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
["millisecond", 217175010_123_000_000n /* 1976-11-18T14:23:30.123Z */],
|
||||||
["microsecond", 217175010_123_456_000n /* 1976-11-18T14:23:30.123456Z */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T14:23:30.123987Z */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T14:23:30.123456789Z */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T14:23:30.1239875Z */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376436]],
|
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376436]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -9]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -9]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376436]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376436]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -9]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -9]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376436]],
|
["hours", [0, 0, 0, 0, 376436], [0, 0, 0, 0, -376436]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -9]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 9], [0, 0, 0, 0, -376435, -23, -9]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376436]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376436]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -9]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -9]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 530], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
["minutes", [0, 0, 0, 0, 376435, 23], [0, 0, 0, 0, -376435, -23]],
|
||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -530]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 149], [0, 0, 0, 0, -376435, -23, -8, -149]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.Instant(217178610_123_456_789n);
|
const earlier = new Temporal.Instant(217178610_123_456_789n /* 1976-11-18T15:23:30.123456789Z */);
|
||||||
const later = new Temporal.Instant(1572345998_271_986_102n);
|
const later = new Temporal.Instant(1572345998_271_986_289n /* 2019-10-29T10:46:38.271986289Z */);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
["hours", [0, 0, 0, 0, 376435], [0, 0, 0, 0, -376435]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
["seconds", [0, 0, 0, 0, 376435, 23, 8], [0, 0, 0, 0, -376435, -23, -8]],
|
||||||
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
["milliseconds", [0, 0, 0, 0, 376435, 23, 8, 148], [0, 0, 0, 0, -376435, -23, -8, -148]],
|
||||||
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
["microseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529], [0, 0, 0, 0, -376435, -23, -8, -148, -529]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 313], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -313]],
|
["nanoseconds", [0, 0, 0, 0, 376435, 23, 8, 148, 529, 500], [0, 0, 0, 0, -376435, -23, -8, -148, -529, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
@ -16,8 +16,8 @@ const expected = [
|
|||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 31]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 31]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 988]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
@ -16,8 +16,8 @@ const expected = [
|
|||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 31]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 31]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 988]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 18]],
|
["day", [1976, 11, 'M11', 18]],
|
||||||
@ -16,8 +16,8 @@ const expected = [
|
|||||||
["minute", [1976, 11, 'M11', 18, 14, 23]],
|
["minute", [1976, 11, 'M11', 18, 14, 23]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
["hour", [1976, 11, 'M11', 18, 14]],
|
["hour", [1976, 11, 'M11', 18, 14]],
|
||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 988]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
["hour", [1976, 11, 'M11', 18, 14]],
|
["hour", [1976, 11, 'M11', 18, 14]],
|
||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 988]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
["hour", [1976, 11, 'M11', 18, 14]],
|
["hour", [1976, 11, 'M11', 18, 14]],
|
||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 988]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
["hour", [1976, 11, 'M11', 18, 14]],
|
["hour", [1976, 11, 'M11', 18, 14]],
|
||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -8,16 +8,16 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 19]],
|
["day", [1976, 11, 'M11', 19]],
|
||||||
["hour", [1976, 11, 'M11', 18, 14]],
|
["hour", [1976, 11, 'M11', 18, 14]],
|
||||||
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
["minute", [1976, 11, 'M11', 18, 14, 24]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 124]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 457]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -8,7 +8,7 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789);
|
const instance = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", [1976, 11, 'M11', 18]],
|
["day", [1976, 11, 'M11', 18]],
|
||||||
@ -16,8 +16,8 @@ const expected = [
|
|||||||
["minute", [1976, 11, 'M11', 18, 14, 23]],
|
["minute", [1976, 11, 'M11', 18, 14, 23]],
|
||||||
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
["second", [1976, 11, 'M11', 18, 14, 23, 30]],
|
||||||
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
["millisecond", [1976, 11, 'M11', 18, 14, 23, 30, 123]],
|
||||||
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456]],
|
["microsecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987]],
|
||||||
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 456, 789]],
|
["nanosecond", [1976, 11, 'M11', 18, 14, 23, 30, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-2]],
|
["years", [3], [-2]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -4]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [2], [-3]],
|
["years", [2], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [2], [-2]],
|
["years", [2], [-2]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -4]],
|
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-2]],
|
["years", [3], [-2]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -4]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 865], [0, 0, 0, -973, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [2], [-3]],
|
["years", [2], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-3]],
|
["years", [3], [-3]],
|
||||||
@ -20,8 +20,8 @@ const expected = [
|
|||||||
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
["minutes", [0, 0, 0, 973, 4, 17], [0, 0, 0, -973, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
["seconds", [0, 0, 0, 973, 4, 17, 5], [0, 0, 0, -973, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 198], [0, 0, 0, -973, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainDateTime(2019, 1, 8, 8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainDateTime(2021, 9, 7, 12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [2], [-2]],
|
["years", [2], [-2]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -4]],
|
["seconds", [0, 0, 0, 973, 4, 17, 4], [0, 0, 0, -973, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 973, 4, 17, 4, 864], [0, 0, 0, -973, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197], [0, 0, 0, -973, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 532], [0, 0, 0, -973, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 973, 4, 17, 4, 864, 197, 500], [0, 0, 0, -973, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 47]],
|
["minute", [13, 47]],
|
||||||
["second", [13, 46, 24]],
|
["second", [13, 46, 24]],
|
||||||
["millisecond", [13, 46, 23, 124]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 988]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 47]],
|
["minute", [13, 47]],
|
||||||
["second", [13, 46, 24]],
|
["second", [13, 46, 24]],
|
||||||
["millisecond", [13, 46, 23, 124]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 988]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [13]],
|
["hour", [13]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 123]],
|
||||||
["microsecond", [13, 46, 23, 123, 456]],
|
["microsecond", [13, 46, 23, 123, 987]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 988]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 988]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 988]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 987]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [14]],
|
["hour", [14]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 124]],
|
||||||
["microsecond", [13, 46, 23, 123, 457]],
|
["microsecond", [13, 46, 23, 123, 987]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -8,15 +8,15 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.PlainTime(13, 46, 23, 123, 456, 789);
|
const instance = new Temporal.PlainTime(13, 46, 23, 123, 987, 500);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hour", [13]],
|
["hour", [13]],
|
||||||
["minute", [13, 46]],
|
["minute", [13, 46]],
|
||||||
["second", [13, 46, 23]],
|
["second", [13, 46, 23]],
|
||||||
["millisecond", [13, 46, 23, 123]],
|
["millisecond", [13, 46, 23, 123]],
|
||||||
["microsecond", [13, 46, 23, 123, 456]],
|
["microsecond", [13, 46, 23, 123, 987]],
|
||||||
["nanosecond", [13, 46, 23, 123, 456, 789]],
|
["nanosecond", [13, 46, 23, 123, 987, 500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -4]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -5]],
|
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -5]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -5]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -5]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -4]],
|
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -4]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -5]],
|
["hours", [0, 0, 0, 0, 5], [0, 0, 0, 0, -5]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 865], [0, 0, 0, 0, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -5]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -5]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -865]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -865]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -9,15 +9,15 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
["minutes", [0, 0, 0, 0, 4, 17], [0, 0, 0, 0, -4, -17]],
|
||||||
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
["seconds", [0, 0, 0, 0, 4, 17, 5], [0, 0, 0, 0, -4, -17, -5]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 198], [0, 0, 0, 0, -4, -17, -4, -864, -198]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -9,7 +9,7 @@ features: [Temporal]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
const earlier = new Temporal.PlainTime(8, 22, 36, 123, 456, 789);
|
||||||
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 321);
|
const later = new Temporal.PlainTime(12, 39, 40, 987, 654, 289);
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
["hours", [0, 0, 0, 0, 4], [0, 0, 0, 0, -4]],
|
||||||
@ -17,7 +17,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -4]],
|
["seconds", [0, 0, 0, 0, 4, 17, 4], [0, 0, 0, 0, -4, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 4, 17, 4, 864], [0, 0, 0, 0, -4, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197], [0, 0, 0, 0, -4, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 532], [0, 0, 0, 0, -4, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 4, 17, 4, 864, 197, 500], [0, 0, 0, 0, -4, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "ceil".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175011_000_000_000n /* 1976-11-18T15:23:31+01:00 */],
|
["second", 217175011_000_000_000n /* 1976-11-18T15:23:31+01:00 */],
|
||||||
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T15:23:30.123988+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "expand".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175011_000_000_000n /* 1976-11-18T15:23:31+01:00 */],
|
["second", 217175011_000_000_000n /* 1976-11-18T15:23:31+01:00 */],
|
||||||
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T15:23:30.123988+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "expand";
|
const roundingMode = "expand";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "floor".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217119600_000_000_000n /* 1976-11-18T00:00:00+01:00 */],
|
["day", 217119600_000_000_000n /* 1976-11-18T00:00:00+01:00 */],
|
||||||
["minute", 217174980_000_000_000n /* 1976-11-18T15:23:00+01:00 */],
|
["minute", 217174980_000_000_000n /* 1976-11-18T15:23:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
||||||
["microsecond", 217175010_123_456_000n /* 1976-11-18T15:23:30.123456+01:00 */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T15:23:30.123987+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "floor";
|
const roundingMode = "floor";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfCeil".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T15:23:30.123988+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfCeil";
|
const roundingMode = "halfCeil";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfEven".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T15:23:30.123988+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfEven";
|
const roundingMode = "halfEven";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfExpand".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_988_000n /* 1976-11-18T15:23:30.123988+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfExpand";
|
const roundingMode = "halfExpand";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfFloor".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T15:23:30.123987+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfFloor";
|
const roundingMode = "halfFloor";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "halfTrunc".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
["day", 217206000_000_000_000n /* 1976-11-19T00:00:00+01:00 */],
|
||||||
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
["minute", 217175040_000_000_000n /* 1976-11-18T15:24:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_124_000_000n /* 1976-11-18T15:23:30.124+01:00 */],
|
||||||
["microsecond", 217175010_123_457_000n /* 1976-11-18T15:23:30.123457+01:00 */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T15:23:30.123987+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "halfTrunc";
|
const roundingMode = "halfTrunc";
|
||||||
|
@ -7,15 +7,15 @@ description: Tests calculations with roundingMode "trunc".
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const instance = new Temporal.ZonedDateTime(217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */, "+01:00");
|
const instance = new Temporal.ZonedDateTime(217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */, "+01:00");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["day", 217119600_000_000_000n /* 1976-11-18T00:00:00+01:00 */],
|
["day", 217119600_000_000_000n /* 1976-11-18T00:00:00+01:00 */],
|
||||||
["minute", 217174980_000_000_000n /* 1976-11-18T15:23:00+01:00 */],
|
["minute", 217174980_000_000_000n /* 1976-11-18T15:23:00+01:00 */],
|
||||||
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
["second", 217175010_000_000_000n /* 1976-11-18T15:23:30+01:00 */],
|
||||||
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
["millisecond", 217175010_123_000_000n /* 1976-11-18T15:23:30.123+01:00 */],
|
||||||
["microsecond", 217175010_123_456_000n /* 1976-11-18T15:23:30.123456+01:00 */],
|
["microsecond", 217175010_123_987_000n /* 1976-11-18T15:23:30.123987+01:00 */],
|
||||||
["nanosecond", 217175010_123_456_789n /* 1976-11-18T15:23:30.123456789+01:00 */],
|
["nanosecond", 217175010_123_987_500n /* 1976-11-18T15:23:30.1239875+01:00 */],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "trunc";
|
const roundingMode = "trunc";
|
||||||
|
@ -8,8 +8,8 @@ includes: [temporalHelpers.js]
|
|||||||
features: [Temporal]
|
features: [Temporal]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
const earlier = new Temporal.ZonedDateTime(1546935756_123_456_789n, "UTC");
|
const earlier = new Temporal.ZonedDateTime(1546935756_123_456_789n /* 2019-01-08T08:22:36.123456789+00:00 */, "UTC");
|
||||||
const later = new Temporal.ZonedDateTime(1631018380_987_654_321n, "UTC");
|
const later = new Temporal.ZonedDateTime(1631018380_987_654_289n /* 2021-09-07T12:39:40.987654289+00:00 */, "UTC");
|
||||||
|
|
||||||
const expected = [
|
const expected = [
|
||||||
["years", [3], [-2]],
|
["years", [3], [-2]],
|
||||||
@ -21,7 +21,7 @@ const expected = [
|
|||||||
["seconds", [0, 0, 0, 0, 23356, 17, 5], [0, 0, 0, 0, -23356, -17, -4]],
|
["seconds", [0, 0, 0, 0, 23356, 17, 5], [0, 0, 0, 0, -23356, -17, -4]],
|
||||||
["milliseconds", [0, 0, 0, 0, 23356, 17, 4, 865], [0, 0, 0, 0, -23356, -17, -4, -864]],
|
["milliseconds", [0, 0, 0, 0, 23356, 17, 4, 865], [0, 0, 0, 0, -23356, -17, -4, -864]],
|
||||||
["microseconds", [0, 0, 0, 0, 23356, 17, 4, 864, 198], [0, 0, 0, 0, -23356, -17, -4, -864, -197]],
|
["microseconds", [0, 0, 0, 0, 23356, 17, 4, 864, 198], [0, 0, 0, 0, -23356, -17, -4, -864, -197]],
|
||||||
["nanoseconds", [0, 0, 0, 0, 23356, 17, 4, 864, 197, 532], [0, 0, 0, 0, -23356, -17, -4, -864, -197, -532]],
|
["nanoseconds", [0, 0, 0, 0, 23356, 17, 4, 864, 197, 500], [0, 0, 0, 0, -23356, -17, -4, -864, -197, -500]],
|
||||||
];
|
];
|
||||||
|
|
||||||
const roundingMode = "ceil";
|
const roundingMode = "ceil";
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user