@formatjs/intl-relativetimeformat 11.4.10 → 11.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +21 -26
- package/polyfill.iife.js +34 -22
package/package.json
CHANGED
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-relativetimeformat",
|
|
3
|
-
"version": "11.4.10",
|
|
4
3
|
"description": "Formats JavaScript dates to relative time strings.",
|
|
5
|
-
"
|
|
6
|
-
"intl",
|
|
7
|
-
"i18n",
|
|
8
|
-
"relative",
|
|
9
|
-
"time",
|
|
10
|
-
"moment",
|
|
11
|
-
"format",
|
|
12
|
-
"date"
|
|
13
|
-
],
|
|
4
|
+
"version": "11.4.12",
|
|
14
5
|
"author": "Long Ho <holevietlong@gmail.com>",
|
|
15
|
-
"bugs":
|
|
16
|
-
"url": "https://github.com/formatjs/formatjs/issues"
|
|
17
|
-
},
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git@github.com:formatjs/formatjs.git"
|
|
21
|
-
},
|
|
6
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
22
7
|
"dependencies": {
|
|
23
|
-
"
|
|
24
|
-
"@formatjs/
|
|
25
|
-
"
|
|
8
|
+
"@formatjs/ecma402-abstract": "2.3.5",
|
|
9
|
+
"@formatjs/intl-localematcher": "0.6.2",
|
|
10
|
+
"tslib": "^2.8.0"
|
|
26
11
|
},
|
|
27
12
|
"devDependencies": {
|
|
28
|
-
"@formatjs/intl-
|
|
29
|
-
"@formatjs/intl-
|
|
30
|
-
"@formatjs/intl-pluralrules": "5.4.
|
|
13
|
+
"@formatjs/intl-getcanonicallocales": "2.5.6",
|
|
14
|
+
"@formatjs/intl-locale": "4.2.12",
|
|
15
|
+
"@formatjs/intl-pluralrules": "5.4.5"
|
|
31
16
|
},
|
|
32
|
-
"
|
|
33
|
-
"types": "index.d.ts",
|
|
17
|
+
"gitHead": "a7842673d8ad205171ad7c8cb8bb2f318b427c0c",
|
|
34
18
|
"homepage": "https://github.com/formatjs/formatjs",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"date",
|
|
21
|
+
"format",
|
|
22
|
+
"i18n",
|
|
23
|
+
"intl",
|
|
24
|
+
"moment",
|
|
25
|
+
"relative",
|
|
26
|
+
"time"
|
|
27
|
+
],
|
|
35
28
|
"license": "MIT",
|
|
36
|
-
"
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"repository": "git@github.com:formatjs/formatjs.git",
|
|
31
|
+
"types": "index.d.ts"
|
|
37
32
|
}
|
package/polyfill.iife.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
return Intl.getCanonicalLocales(locales);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
// node_modules/.aspect_rules_js/decimal.js@10.
|
|
14
|
+
// node_modules/.aspect_rules_js/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs
|
|
15
15
|
var EXP_LIMIT = 9e15;
|
|
16
16
|
var MAX_DIGITS = 1e9;
|
|
17
17
|
var NUMERALS = "0123456789abcdef";
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
|
|
304
304
|
};
|
|
305
305
|
P.inverseCosine = P.acos = function() {
|
|
306
|
-
var
|
|
306
|
+
var x = this, Ctor = x.constructor, k = x.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
|
|
307
307
|
if (k !== -1) {
|
|
308
308
|
return k === 0 ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
|
|
309
309
|
}
|
|
@@ -311,11 +311,10 @@
|
|
|
311
311
|
return getPi(Ctor, pr + 4, rm).times(0.5);
|
|
312
312
|
Ctor.precision = pr + 6;
|
|
313
313
|
Ctor.rounding = 1;
|
|
314
|
-
x = x.
|
|
315
|
-
halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
|
|
314
|
+
x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();
|
|
316
315
|
Ctor.precision = pr;
|
|
317
316
|
Ctor.rounding = rm;
|
|
318
|
-
return
|
|
317
|
+
return x.times(2);
|
|
319
318
|
};
|
|
320
319
|
P.inverseHyperbolicCosine = P.acosh = function() {
|
|
321
320
|
var pr, rm, x = this, Ctor = x.constructor;
|
|
@@ -1527,14 +1526,16 @@
|
|
|
1527
1526
|
function isOdd(n) {
|
|
1528
1527
|
return n.d[n.d.length - 1] & 1;
|
|
1529
1528
|
}
|
|
1530
|
-
function maxOrMin(Ctor, args,
|
|
1531
|
-
var y, x = new Ctor(args[0]), i = 0;
|
|
1529
|
+
function maxOrMin(Ctor, args, n) {
|
|
1530
|
+
var k, y, x = new Ctor(args[0]), i = 0;
|
|
1532
1531
|
for (; ++i < args.length; ) {
|
|
1533
1532
|
y = new Ctor(args[i]);
|
|
1534
1533
|
if (!y.s) {
|
|
1535
1534
|
x = y;
|
|
1536
1535
|
break;
|
|
1537
|
-
}
|
|
1536
|
+
}
|
|
1537
|
+
k = x.cmp(y);
|
|
1538
|
+
if (k === n || k === 0 && x.s === n) {
|
|
1538
1539
|
x = y;
|
|
1539
1540
|
}
|
|
1540
1541
|
}
|
|
@@ -2116,7 +2117,8 @@
|
|
|
2116
2117
|
x.d = [v];
|
|
2117
2118
|
}
|
|
2118
2119
|
return;
|
|
2119
|
-
}
|
|
2120
|
+
}
|
|
2121
|
+
if (v * 0 !== 0) {
|
|
2120
2122
|
if (!v)
|
|
2121
2123
|
x.s = NaN;
|
|
2122
2124
|
x.e = NaN;
|
|
@@ -2124,18 +2126,28 @@
|
|
|
2124
2126
|
return;
|
|
2125
2127
|
}
|
|
2126
2128
|
return parseDecimal(x, v.toString());
|
|
2127
|
-
} else if (t !== "string") {
|
|
2128
|
-
throw Error(invalidArgument + v);
|
|
2129
2129
|
}
|
|
2130
|
-
if (
|
|
2131
|
-
|
|
2132
|
-
x.s = -1;
|
|
2133
|
-
} else {
|
|
2134
|
-
if (i2 === 43)
|
|
2130
|
+
if (t === "string") {
|
|
2131
|
+
if ((i2 = v.charCodeAt(0)) === 45) {
|
|
2135
2132
|
v = v.slice(1);
|
|
2136
|
-
|
|
2133
|
+
x.s = -1;
|
|
2134
|
+
} else {
|
|
2135
|
+
if (i2 === 43)
|
|
2136
|
+
v = v.slice(1);
|
|
2137
|
+
x.s = 1;
|
|
2138
|
+
}
|
|
2139
|
+
return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
|
|
2140
|
+
}
|
|
2141
|
+
if (t === "bigint") {
|
|
2142
|
+
if (v < 0) {
|
|
2143
|
+
v = -v;
|
|
2144
|
+
x.s = -1;
|
|
2145
|
+
} else {
|
|
2146
|
+
x.s = 1;
|
|
2147
|
+
}
|
|
2148
|
+
return parseDecimal(x, v.toString());
|
|
2137
2149
|
}
|
|
2138
|
-
|
|
2150
|
+
throw Error(invalidArgument + v);
|
|
2139
2151
|
}
|
|
2140
2152
|
Decimal2.prototype = P;
|
|
2141
2153
|
Decimal2.ROUND_UP = 0;
|
|
@@ -2245,10 +2257,10 @@
|
|
|
2245
2257
|
return new this(x).log(10);
|
|
2246
2258
|
}
|
|
2247
2259
|
function max() {
|
|
2248
|
-
return maxOrMin(this, arguments,
|
|
2260
|
+
return maxOrMin(this, arguments, -1);
|
|
2249
2261
|
}
|
|
2250
2262
|
function min() {
|
|
2251
|
-
return maxOrMin(this, arguments,
|
|
2263
|
+
return maxOrMin(this, arguments, 1);
|
|
2252
2264
|
}
|
|
2253
2265
|
function mod(x, y) {
|
|
2254
2266
|
return new this(x).mod(y);
|
|
@@ -7469,10 +7481,10 @@
|
|
|
7469
7481
|
|
|
7470
7482
|
decimal.js/decimal.mjs:
|
|
7471
7483
|
(*!
|
|
7472
|
-
* decimal.js v10.
|
|
7484
|
+
* decimal.js v10.6.0
|
|
7473
7485
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
7474
7486
|
* https://github.com/MikeMcl/decimal.js
|
|
7475
|
-
* Copyright (c)
|
|
7487
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
7476
7488
|
* MIT Licence
|
|
7477
7489
|
*)
|
|
7478
7490
|
*/
|