chronos-date 2.0.4 → 2.1.0
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/dist/constants.d.mts +1 -1
- package/dist/convert-C8LsoKmI-Blf3eLS6.mjs +285 -0
- package/dist/convert-C8LsoKmI-uBhT5hZQ.cjs +387 -0
- package/dist/dist-BPHYJA0t.mjs +70 -0
- package/dist/dist-CdMlZMZa.cjs +75 -0
- package/dist/{greet-DNGvP7nm.mjs → greet-BC86-X9W.mjs} +2 -2
- package/dist/{greet-CMkwXJ7o.cjs → greet-Brz0CVv1.cjs} +8 -8
- package/dist/guards-DTI799nG.mjs +46 -0
- package/dist/guards-dH9JJIso.cjs +51 -0
- package/dist/guards.cjs +14 -16
- package/dist/guards.d.cts +1 -1
- package/dist/guards.d.mts +1 -1
- package/dist/guards.mjs +1 -3
- package/dist/{helpers-Bq7Hczoa.cjs → helpers-BMDeRLjO.cjs} +6 -8
- package/dist/{helpers-C2spzGZ-.mjs → helpers-t49KkxOE.mjs} +2 -4
- package/dist/index.cjs +13 -14
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -5
- package/dist/plugins/banglaPlugin.cjs +16 -33
- package/dist/plugins/banglaPlugin.d.cts +1 -1
- package/dist/plugins/banglaPlugin.d.mts +1 -1
- package/dist/plugins/banglaPlugin.mjs +2 -19
- package/dist/plugins/businessPlugin.cjs +4 -5
- package/dist/plugins/businessPlugin.d.cts +1 -1
- package/dist/plugins/businessPlugin.d.mts +1 -1
- package/dist/plugins/businessPlugin.mjs +1 -2
- package/dist/plugins/dateRangePlugin.cjs +4 -5
- package/dist/plugins/dateRangePlugin.d.cts +1 -1
- package/dist/plugins/dateRangePlugin.d.mts +1 -1
- package/dist/plugins/dateRangePlugin.mjs +1 -2
- package/dist/plugins/dayPartPlugin.cjs +2 -2
- package/dist/plugins/dayPartPlugin.d.cts +1 -1
- package/dist/plugins/dayPartPlugin.d.mts +1 -1
- package/dist/plugins/dayPartPlugin.mjs +1 -1
- package/dist/plugins/durationPlugin.d.cts +1 -1
- package/dist/plugins/durationPlugin.d.mts +1 -1
- package/dist/plugins/fromNowPlugin.cjs +2 -2
- package/dist/plugins/fromNowPlugin.d.cts +1 -1
- package/dist/plugins/fromNowPlugin.d.mts +1 -1
- package/dist/plugins/fromNowPlugin.mjs +1 -1
- package/dist/plugins/greetingPlugin.cjs +1 -1
- package/dist/plugins/greetingPlugin.d.cts +1 -1
- package/dist/plugins/greetingPlugin.d.mts +1 -1
- package/dist/plugins/greetingPlugin.mjs +1 -1
- package/dist/plugins/palindromePlugin.cjs +2 -9
- package/dist/plugins/palindromePlugin.d.cts +1 -1
- package/dist/plugins/palindromePlugin.d.mts +1 -1
- package/dist/plugins/palindromePlugin.mjs +1 -8
- package/dist/plugins/relativeTimePlugin.d.cts +1 -1
- package/dist/plugins/relativeTimePlugin.d.mts +1 -1
- package/dist/plugins/roundPlugin.cjs +8 -8
- package/dist/plugins/roundPlugin.d.cts +1 -1
- package/dist/plugins/roundPlugin.d.mts +1 -1
- package/dist/plugins/roundPlugin.mjs +1 -1
- package/dist/plugins/seasonPlugin.d.cts +1 -1
- package/dist/plugins/seasonPlugin.d.mts +1 -1
- package/dist/plugins/timeZonePlugin.cjs +3 -3
- package/dist/plugins/timeZonePlugin.d.cts +1 -1
- package/dist/plugins/timeZonePlugin.d.mts +1 -1
- package/dist/plugins/timeZonePlugin.mjs +2 -2
- package/dist/plugins/zodiacPlugin.cjs +1 -1
- package/dist/plugins/zodiacPlugin.d.cts +1 -1
- package/dist/plugins/zodiacPlugin.d.mts +1 -1
- package/dist/plugins/zodiacPlugin.mjs +1 -1
- package/dist/{types-Be4ZMpOV.d.mts → types-CiFnGEL8.d.mts} +967 -902
- package/dist/{types-dNpvroNQ.d.cts → types-zhhEJ8N7.d.cts} +966 -901
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/{utilities-C6NiChRE.mjs → utils-DBy7S7hH.mjs} +3 -5
- package/dist/{utilities-CCnKWAsS.cjs → utils-S_aw0TeC.cjs} +8 -10
- package/dist/utils.cjs +33 -34
- package/dist/utils.d.cts +4 -4
- package/dist/utils.d.mts +4 -4
- package/dist/utils.mjs +4 -5
- package/package.json +3 -3
- package/dist/convert-BDQBTK5P.cjs +0 -49
- package/dist/convert-D5Cd0cCg.mjs +0 -38
- package/dist/non-primitives-BqjRwK2B.cjs +0 -68
- package/dist/non-primitives-CbAOB6lb.mjs +0 -38
- package/dist/primitives-BXhrgs9R.mjs +0 -35
- package/dist/primitives-DfO90c3G.cjs +0 -65
- package/dist/utilities-BnHD2hHf.mjs +0 -59
- package/dist/utilities-C_KmjIRK.cjs +0 -88
- /package/dist/{seasons-B_kjFWIX.d.mts → seasons-DYk2jvtn.d.mts} +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { i as isString, r as isNumber } from "./primitives-BXhrgs9R.mjs";
|
|
18
|
-
|
|
19
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/guards/specials.js
|
|
20
|
-
function isNumericString(value) {
|
|
21
|
-
return isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/number/constants.js
|
|
26
|
-
const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
27
|
-
"০": 0,
|
|
28
|
-
"১": 1,
|
|
29
|
-
"২": 2,
|
|
30
|
-
"৩": 3,
|
|
31
|
-
"৪": 4,
|
|
32
|
-
"৫": 5,
|
|
33
|
-
"৬": 6,
|
|
34
|
-
"৭": 7,
|
|
35
|
-
"৮": 8,
|
|
36
|
-
"৯": 9
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/number/utilities.js
|
|
41
|
-
const roundToNearest = (value, interval = 5) => {
|
|
42
|
-
return Math.round(Number(value) / interval) * interval;
|
|
43
|
-
};
|
|
44
|
-
const getOrdinal = (num, withNumber = true) => {
|
|
45
|
-
const remainder10 = Number(num) % 10;
|
|
46
|
-
const remainder100 = Number(num) % 100;
|
|
47
|
-
let suffix;
|
|
48
|
-
if (remainder10 === 1 && remainder100 !== 11) suffix = "st";
|
|
49
|
-
else if (remainder10 === 2 && remainder100 !== 12) suffix = "nd";
|
|
50
|
-
else if (remainder10 === 3 && remainder100 !== 13) suffix = "rd";
|
|
51
|
-
else suffix = "th";
|
|
52
|
-
return withNumber ? String(num).concat(suffix) : suffix;
|
|
53
|
-
};
|
|
54
|
-
function normalizeNumber(num) {
|
|
55
|
-
return isNumber(num) ? num : isNumericString(num) ? Number(num) : void 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { isNumericString as a, BN_DIGITS as i, normalizeNumber as n, roundToNearest as r, getOrdinal as t };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const require_primitives = require('./primitives-DfO90c3G.cjs');
|
|
18
|
-
|
|
19
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/guards/specials.js
|
|
20
|
-
function isNumericString(value) {
|
|
21
|
-
return require_primitives.isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/number/constants.js
|
|
26
|
-
const BN_DIGITS = /* @__PURE__ */ Object.freeze({
|
|
27
|
-
"০": 0,
|
|
28
|
-
"১": 1,
|
|
29
|
-
"২": 2,
|
|
30
|
-
"৩": 3,
|
|
31
|
-
"৪": 4,
|
|
32
|
-
"৫": 5,
|
|
33
|
-
"৬": 6,
|
|
34
|
-
"৭": 7,
|
|
35
|
-
"৮": 8,
|
|
36
|
-
"৯": 9
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region node_modules/.pnpm/nhb-toolbox@4.30.14/node_modules/nhb-toolbox/dist/esm/number/utilities.js
|
|
41
|
-
const roundToNearest = (value, interval = 5) => {
|
|
42
|
-
return Math.round(Number(value) / interval) * interval;
|
|
43
|
-
};
|
|
44
|
-
const getOrdinal = (num, withNumber = true) => {
|
|
45
|
-
const remainder10 = Number(num) % 10;
|
|
46
|
-
const remainder100 = Number(num) % 100;
|
|
47
|
-
let suffix;
|
|
48
|
-
if (remainder10 === 1 && remainder100 !== 11) suffix = "st";
|
|
49
|
-
else if (remainder10 === 2 && remainder100 !== 12) suffix = "nd";
|
|
50
|
-
else if (remainder10 === 3 && remainder100 !== 13) suffix = "rd";
|
|
51
|
-
else suffix = "th";
|
|
52
|
-
return withNumber ? String(num).concat(suffix) : suffix;
|
|
53
|
-
};
|
|
54
|
-
function normalizeNumber(num) {
|
|
55
|
-
return require_primitives.isNumber(num) ? num : isNumericString(num) ? Number(num) : void 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
Object.defineProperty(exports, 'BN_DIGITS', {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: function () {
|
|
62
|
-
return BN_DIGITS;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(exports, 'getOrdinal', {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return getOrdinal;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
Object.defineProperty(exports, 'isNumericString', {
|
|
72
|
-
enumerable: true,
|
|
73
|
-
get: function () {
|
|
74
|
-
return isNumericString;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
Object.defineProperty(exports, 'normalizeNumber', {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: function () {
|
|
80
|
-
return normalizeNumber;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
Object.defineProperty(exports, 'roundToNearest', {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function () {
|
|
86
|
-
return roundToNearest;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
File without changes
|