chronos-date 1.0.2 → 1.1.1
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/basic-DqKyujoj.mjs +382 -0
- package/dist/basic-DsQqC5nZ.cjs +466 -0
- package/dist/constants.cjs +43 -1
- package/dist/constants.d.cts +17 -1
- package/dist/constants.d.mts +17 -1
- package/dist/constants.mjs +21 -1
- package/dist/convert-DbgntRVW.cjs +49 -0
- package/dist/convert-mMaI4YP0.mjs +38 -0
- package/dist/greet-D07t2_e6.mjs +51 -0
- package/dist/greet-hjVsd2dt.cjs +56 -0
- package/dist/guards.cjs +140 -1
- package/dist/guards.d.cts +18 -2
- package/dist/guards.d.mts +18 -2
- package/dist/guards.mjs +131 -1
- package/dist/helpers-CQzi908i.cjs +278 -0
- package/dist/helpers-DEf4sevD.mjs +201 -0
- package/dist/index.cjs +1477 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.mts +18 -2
- package/dist/index.mjs +1474 -1
- package/dist/non-primitives-D9zxCwX8.cjs +68 -0
- package/dist/non-primitives-DBtomDty.mjs +38 -0
- package/dist/plugins/banglaPlugin.cjs +137 -1
- package/dist/plugins/banglaPlugin.d.cts +19 -3
- package/dist/plugins/banglaPlugin.d.mts +19 -3
- package/dist/plugins/banglaPlugin.mjs +136 -1
- package/dist/plugins/businessPlugin.cjs +134 -1
- package/dist/plugins/businessPlugin.d.cts +17 -1
- package/dist/plugins/businessPlugin.d.mts +17 -1
- package/dist/plugins/businessPlugin.mjs +133 -1
- package/dist/plugins/dateRangePlugin.cjs +62 -1
- package/dist/plugins/dateRangePlugin.d.cts +19 -3
- package/dist/plugins/dateRangePlugin.d.mts +19 -3
- package/dist/plugins/dateRangePlugin.mjs +61 -1
- package/dist/plugins/dayPartPlugin.cjs +42 -1
- package/dist/plugins/dayPartPlugin.d.cts +17 -1
- package/dist/plugins/dayPartPlugin.d.mts +17 -1
- package/dist/plugins/dayPartPlugin.mjs +41 -1
- package/dist/plugins/durationPlugin.cjs +107 -1
- package/dist/plugins/durationPlugin.d.cts +17 -1
- package/dist/plugins/durationPlugin.d.mts +17 -1
- package/dist/plugins/durationPlugin.mjs +106 -1
- package/dist/plugins/fromNowPlugin.cjs +96 -1
- package/dist/plugins/fromNowPlugin.d.cts +17 -1
- package/dist/plugins/fromNowPlugin.d.mts +17 -1
- package/dist/plugins/fromNowPlugin.mjs +95 -1
- package/dist/plugins/greetingPlugin.cjs +35 -1
- package/dist/plugins/greetingPlugin.d.cts +17 -1
- package/dist/plugins/greetingPlugin.d.mts +17 -1
- package/dist/plugins/greetingPlugin.mjs +34 -1
- package/dist/plugins/palindromePlugin.cjs +38 -1
- package/dist/plugins/palindromePlugin.d.cts +17 -1
- package/dist/plugins/palindromePlugin.d.mts +17 -1
- package/dist/plugins/palindromePlugin.mjs +37 -1
- package/dist/plugins/relativeTimePlugin.cjs +90 -1
- package/dist/plugins/relativeTimePlugin.d.cts +17 -1
- package/dist/plugins/relativeTimePlugin.d.mts +17 -1
- package/dist/plugins/relativeTimePlugin.mjs +89 -1
- package/dist/plugins/roundPlugin.cjs +85 -1
- package/dist/plugins/roundPlugin.d.cts +17 -1
- package/dist/plugins/roundPlugin.d.mts +17 -1
- package/dist/plugins/roundPlugin.mjs +84 -1
- package/dist/plugins/seasonPlugin.cjs +47 -1
- package/dist/plugins/seasonPlugin.d.cts +17 -1
- package/dist/plugins/seasonPlugin.d.mts +17 -1
- package/dist/plugins/seasonPlugin.mjs +46 -1
- package/dist/plugins/timeZonePlugin.cjs +155 -1
- package/dist/plugins/timeZonePlugin.d.cts +17 -1
- package/dist/plugins/timeZonePlugin.d.mts +17 -1
- package/dist/plugins/timeZonePlugin.mjs +154 -1
- package/dist/plugins/zodiacPlugin.cjs +67 -1
- package/dist/plugins/zodiacPlugin.d.cts +17 -1
- package/dist/plugins/zodiacPlugin.d.mts +17 -1
- package/dist/plugins/zodiacPlugin.mjs +66 -1
- package/dist/primitives-CtuSNmV7.cjs +65 -0
- package/dist/primitives-dXzXlzJw.mjs +35 -0
- package/dist/seasons-B7kK88zq.cjs +434 -0
- package/dist/{seasons-CioTH5Dm.d.mts → seasons-B_kjFWIX.d.mts} +16 -0
- package/dist/{seasons-CsVeJ27s.d.cts → seasons-CpUn45n6.d.cts} +16 -0
- package/dist/seasons-Cq3ah3pV.mjs +368 -0
- package/dist/timezone-BNnHFgki.cjs +5625 -0
- package/dist/timezone-Db2CeL32.mjs +5589 -0
- package/dist/{types-B2fgrJ86.d.mts → types-Cb4gxrgJ.d.mts} +29 -15
- package/dist/{types-DPTQ_yLx.d.cts → types-CdmsXbU_.d.cts} +29 -15
- package/dist/types.cjs +16 -0
- package/dist/types.d.cts +18 -2
- package/dist/types.d.mts +18 -2
- package/dist/types.mjs +17 -1
- package/dist/utilities-BGX8dviZ.mjs +257 -0
- package/dist/utilities-BKtVo78T.mjs +59 -0
- package/dist/utilities-CpF3uys3.cjs +88 -0
- package/dist/utilities-D47SN9EZ.cjs +334 -0
- package/dist/utils.cjs +92 -1
- package/dist/utils.d.cts +20 -4
- package/dist/utils.d.mts +20 -4
- package/dist/utils.mjs +60 -1
- package/package.json +10 -4
- package/dist/basic-CKxaRSHQ.cjs +0 -1
- package/dist/basic-e46DaNAi.mjs +0 -1
- package/dist/convert-Bmp63ats.mjs +0 -1
- package/dist/convert-DrLrcgqz.cjs +0 -1
- package/dist/greet-BBsrvmkn.mjs +0 -1
- package/dist/greet-C-6mruI9.cjs +0 -1
- package/dist/helpers-DGzYnP81.cjs +0 -1
- package/dist/helpers-N1X_Rj_V.mjs +0 -1
- package/dist/non-primitives-B2EE6D6s.mjs +0 -1
- package/dist/non-primitives-Bu3a4WL4.cjs +0 -1
- package/dist/primitives-Cxss_JVF.mjs +0 -1
- package/dist/primitives-Db2FUp4e.cjs +0 -1
- package/dist/seasons-ChAIVphi.mjs +0 -1
- package/dist/seasons-oABOhHcX.cjs +0 -1
- package/dist/timezone-B10UItNO.mjs +0 -1
- package/dist/timezone-CWxbK_7I.cjs +0 -1
- package/dist/utilities-B8dOAQVD.cjs +0 -1
- package/dist/utilities-BJE06bms.mjs +0 -1
- package/dist/utilities-D2-p26DX.cjs +0 -1
- package/dist/utilities-DV_ohS37.mjs +0 -1
|
@@ -0,0 +1,466 @@
|
|
|
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
|
+
|
|
18
|
+
//#region src/constants/basic.ts
|
|
19
|
+
/** @internal Symbol for accessing Chronos internals (plugin author use only) */
|
|
20
|
+
const INTERNALS = Symbol("Internals");
|
|
21
|
+
/** Milliseconds per day */
|
|
22
|
+
const MS_PER_DAY = 864e5;
|
|
23
|
+
/** Array of strings containing all the seven week-day names, starting with `Sunday` */
|
|
24
|
+
const DAYS = /* @__PURE__ */ Object.freeze([
|
|
25
|
+
"Sunday",
|
|
26
|
+
"Monday",
|
|
27
|
+
"Tuesday",
|
|
28
|
+
"Wednesday",
|
|
29
|
+
"Thursday",
|
|
30
|
+
"Friday",
|
|
31
|
+
"Saturday"
|
|
32
|
+
]);
|
|
33
|
+
/** Array of strings containing all the 12 month names, starting with `January` */
|
|
34
|
+
const MONTHS = /* @__PURE__ */ Object.freeze([
|
|
35
|
+
"January",
|
|
36
|
+
"February",
|
|
37
|
+
"March",
|
|
38
|
+
"April",
|
|
39
|
+
"May",
|
|
40
|
+
"June",
|
|
41
|
+
"July",
|
|
42
|
+
"August",
|
|
43
|
+
"September",
|
|
44
|
+
"October",
|
|
45
|
+
"November",
|
|
46
|
+
"December"
|
|
47
|
+
]);
|
|
48
|
+
const YEAR_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
49
|
+
"YYYY",
|
|
50
|
+
"YY",
|
|
51
|
+
"yyyy",
|
|
52
|
+
"yy"
|
|
53
|
+
]);
|
|
54
|
+
const MONTH_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
55
|
+
"M",
|
|
56
|
+
"MM",
|
|
57
|
+
"mmm",
|
|
58
|
+
"mmmm"
|
|
59
|
+
]);
|
|
60
|
+
const DATE_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
61
|
+
"DD",
|
|
62
|
+
"D",
|
|
63
|
+
"Do"
|
|
64
|
+
]);
|
|
65
|
+
const DAY_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
66
|
+
"d",
|
|
67
|
+
"dd",
|
|
68
|
+
"ddd"
|
|
69
|
+
]);
|
|
70
|
+
const HOUR_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
71
|
+
"H",
|
|
72
|
+
"HH",
|
|
73
|
+
"hh",
|
|
74
|
+
"h"
|
|
75
|
+
]);
|
|
76
|
+
const MINUTE_FORMATS = /* @__PURE__ */ Object.freeze(["mm", "m"]);
|
|
77
|
+
const SECOND_FORMATS = /* @__PURE__ */ Object.freeze(["ss", "s"]);
|
|
78
|
+
const MILLISECOND_FORMATS = /* @__PURE__ */ Object.freeze(["ms", "mss"]);
|
|
79
|
+
const TIME_FORMATS = /* @__PURE__ */ Object.freeze(["a", "A"]);
|
|
80
|
+
const EXTRA_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
81
|
+
"Z",
|
|
82
|
+
"ZZ",
|
|
83
|
+
"S",
|
|
84
|
+
"SS"
|
|
85
|
+
]);
|
|
86
|
+
const SORTED_TIME_FORMATS = /* @__PURE__ */ Object.freeze([
|
|
87
|
+
...YEAR_FORMATS,
|
|
88
|
+
...MONTH_FORMATS,
|
|
89
|
+
...DAY_FORMATS,
|
|
90
|
+
...DATE_FORMATS,
|
|
91
|
+
...HOUR_FORMATS,
|
|
92
|
+
...MINUTE_FORMATS,
|
|
93
|
+
...SECOND_FORMATS,
|
|
94
|
+
...MILLISECOND_FORMATS,
|
|
95
|
+
...TIME_FORMATS,
|
|
96
|
+
...EXTRA_FORMATS
|
|
97
|
+
].sort((a, b) => b.length - a.length));
|
|
98
|
+
/** Ranges for day parts. */
|
|
99
|
+
const DATE_PART_RANGES = /* @__PURE__ */ Object.freeze({
|
|
100
|
+
night: ["21", "23"],
|
|
101
|
+
midnight: ["00", "01"],
|
|
102
|
+
lateNight: ["02", "04"],
|
|
103
|
+
morning: ["05", "11"],
|
|
104
|
+
afternoon: ["12", "16"],
|
|
105
|
+
evening: ["17", "20"]
|
|
106
|
+
});
|
|
107
|
+
/** Western Zodiac Signs */
|
|
108
|
+
const WESTERN_ZODIAC_SIGNS = /* @__PURE__ */ Object.freeze([
|
|
109
|
+
["Capricorn", [12, 22]],
|
|
110
|
+
["Aquarius", [1, 20]],
|
|
111
|
+
["Pisces", [2, 19]],
|
|
112
|
+
["Aries", [3, 21]],
|
|
113
|
+
["Taurus", [4, 20]],
|
|
114
|
+
["Gemini", [5, 21]],
|
|
115
|
+
["Cancer", [6, 21]],
|
|
116
|
+
["Leo", [7, 23]],
|
|
117
|
+
["Virgo", [8, 23]],
|
|
118
|
+
["Libra", [9, 23]],
|
|
119
|
+
["Scorpio", [10, 23]],
|
|
120
|
+
["Sagittarius", [11, 22]]
|
|
121
|
+
]);
|
|
122
|
+
/** Vedic Zodiac Sign */
|
|
123
|
+
const VEDIC_ZODIAC_SIGNS = /* @__PURE__ */ Object.freeze([
|
|
124
|
+
["Capricorn", [1, 14]],
|
|
125
|
+
["Aquarius", [2, 13]],
|
|
126
|
+
["Pisces", [3, 14]],
|
|
127
|
+
["Aries", [4, 14]],
|
|
128
|
+
["Taurus", [5, 15]],
|
|
129
|
+
["Gemini", [6, 15]],
|
|
130
|
+
["Cancer", [7, 16]],
|
|
131
|
+
["Leo", [8, 17]],
|
|
132
|
+
["Virgo", [9, 17]],
|
|
133
|
+
["Libra", [10, 17]],
|
|
134
|
+
["Scorpio", [11, 16]],
|
|
135
|
+
["Sagittarius", [12, 16]]
|
|
136
|
+
]);
|
|
137
|
+
/** Zodiac Signs Presets */
|
|
138
|
+
const ZODIAC_PRESETS = /* @__PURE__ */ Object.freeze({
|
|
139
|
+
western: WESTERN_ZODIAC_SIGNS,
|
|
140
|
+
vedic: VEDIC_ZODIAC_SIGNS,
|
|
141
|
+
tropical: WESTERN_ZODIAC_SIGNS,
|
|
142
|
+
sidereal: VEDIC_ZODIAC_SIGNS
|
|
143
|
+
});
|
|
144
|
+
/** Map to different time units to milliseconds */
|
|
145
|
+
const MS_MAP = /* @__PURE__ */ Object.freeze((() => {
|
|
146
|
+
const s = 1e3;
|
|
147
|
+
const m = s * 60;
|
|
148
|
+
const h = m * 60;
|
|
149
|
+
const d = h * 24;
|
|
150
|
+
const w = d * 7;
|
|
151
|
+
const y = d * 365.25;
|
|
152
|
+
const mo = y / 12;
|
|
153
|
+
return {
|
|
154
|
+
y,
|
|
155
|
+
yr: y,
|
|
156
|
+
yrs: y,
|
|
157
|
+
year: y,
|
|
158
|
+
years: y,
|
|
159
|
+
mo,
|
|
160
|
+
month: mo,
|
|
161
|
+
months: mo,
|
|
162
|
+
w,
|
|
163
|
+
week: w,
|
|
164
|
+
weeks: w,
|
|
165
|
+
d,
|
|
166
|
+
day: d,
|
|
167
|
+
days: d,
|
|
168
|
+
h,
|
|
169
|
+
hr: h,
|
|
170
|
+
hrs: h,
|
|
171
|
+
hour: h,
|
|
172
|
+
hours: h,
|
|
173
|
+
m,
|
|
174
|
+
min: m,
|
|
175
|
+
mins: m,
|
|
176
|
+
minute: m,
|
|
177
|
+
minutes: m,
|
|
178
|
+
s,
|
|
179
|
+
sec: s,
|
|
180
|
+
secs: s,
|
|
181
|
+
second: s,
|
|
182
|
+
seconds: s,
|
|
183
|
+
ms: 1,
|
|
184
|
+
msec: 1,
|
|
185
|
+
msecs: 1,
|
|
186
|
+
millisecond: 1,
|
|
187
|
+
milliseconds: 1
|
|
188
|
+
};
|
|
189
|
+
})());
|
|
190
|
+
/** Bangla month days table for different variants */
|
|
191
|
+
const BN_MONTH_TABLES = /* @__PURE__ */ Object.freeze({
|
|
192
|
+
"revised-2019": {
|
|
193
|
+
normal: [
|
|
194
|
+
31,
|
|
195
|
+
31,
|
|
196
|
+
31,
|
|
197
|
+
31,
|
|
198
|
+
31,
|
|
199
|
+
31,
|
|
200
|
+
30,
|
|
201
|
+
30,
|
|
202
|
+
30,
|
|
203
|
+
30,
|
|
204
|
+
29,
|
|
205
|
+
30
|
|
206
|
+
],
|
|
207
|
+
leap: [
|
|
208
|
+
31,
|
|
209
|
+
31,
|
|
210
|
+
31,
|
|
211
|
+
31,
|
|
212
|
+
31,
|
|
213
|
+
31,
|
|
214
|
+
30,
|
|
215
|
+
30,
|
|
216
|
+
30,
|
|
217
|
+
30,
|
|
218
|
+
30,
|
|
219
|
+
30
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"revised-1966": {
|
|
223
|
+
normal: [
|
|
224
|
+
31,
|
|
225
|
+
31,
|
|
226
|
+
31,
|
|
227
|
+
31,
|
|
228
|
+
31,
|
|
229
|
+
30,
|
|
230
|
+
30,
|
|
231
|
+
30,
|
|
232
|
+
30,
|
|
233
|
+
30,
|
|
234
|
+
30,
|
|
235
|
+
30
|
|
236
|
+
],
|
|
237
|
+
leap: [
|
|
238
|
+
31,
|
|
239
|
+
31,
|
|
240
|
+
31,
|
|
241
|
+
31,
|
|
242
|
+
31,
|
|
243
|
+
30,
|
|
244
|
+
30,
|
|
245
|
+
30,
|
|
246
|
+
30,
|
|
247
|
+
30,
|
|
248
|
+
31,
|
|
249
|
+
30
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
/** List of Bangla season names in Bangla and English */
|
|
254
|
+
const BN_SEASONS = /* @__PURE__ */ Object.freeze([
|
|
255
|
+
{
|
|
256
|
+
bn: "গ্রীষ্ম",
|
|
257
|
+
en: "Grisma (Summer)"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
bn: "বর্ষা",
|
|
261
|
+
en: "Barsa (Monsoon)"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
bn: "শরৎ",
|
|
265
|
+
en: "Sarat (Autumn)"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
bn: "হেমন্ত",
|
|
269
|
+
en: "Hemanta (Late-Autumn)"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
bn: "শীত",
|
|
273
|
+
en: "Shhit (Winter)"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
bn: "বসন্ত",
|
|
277
|
+
en: "Basanta (Spring)"
|
|
278
|
+
}
|
|
279
|
+
]);
|
|
280
|
+
/** List of Bangla day names in Bangla and English */
|
|
281
|
+
const BN_DAYS = /* @__PURE__ */ Object.freeze([
|
|
282
|
+
{
|
|
283
|
+
bn: "রবিবার",
|
|
284
|
+
en: "Robibar (Sunday)",
|
|
285
|
+
short: "র"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
bn: "সোমবার",
|
|
289
|
+
en: "Shombar (Monday)",
|
|
290
|
+
short: "সো"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
bn: "মঙ্গলবার",
|
|
294
|
+
en: "Mongolbar (Tuesday)",
|
|
295
|
+
short: "ম"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
bn: "বুধবার",
|
|
299
|
+
en: "Budhbar (Wednesday)",
|
|
300
|
+
short: "বু"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
bn: "বৃহস্পতিবার",
|
|
304
|
+
en: "Brihoshpotibar (Thursday)",
|
|
305
|
+
short: "বৃ"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
bn: "শুক্রবার",
|
|
309
|
+
en: "Shukrobar (Friday)",
|
|
310
|
+
short: "শু"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
bn: "শনিবার",
|
|
314
|
+
en: "Shonibar (Saturday)",
|
|
315
|
+
short: "শ"
|
|
316
|
+
}
|
|
317
|
+
]);
|
|
318
|
+
/** List of Bangla month names in Bangla and English */
|
|
319
|
+
const BN_MONTHS = /* @__PURE__ */ Object.freeze([
|
|
320
|
+
{
|
|
321
|
+
bn: "বৈশাখ",
|
|
322
|
+
en: "Boishakh",
|
|
323
|
+
short: "বৈ"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
bn: "জ্যৈষ্ঠ",
|
|
327
|
+
en: "Joishtho",
|
|
328
|
+
short: "জ্য"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
bn: "আষাঢ়",
|
|
332
|
+
en: "Asharh",
|
|
333
|
+
short: "আ"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
bn: "শ্রাবণ",
|
|
337
|
+
en: "Srabon",
|
|
338
|
+
short: "শ্রা"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
bn: "ভাদ্র",
|
|
342
|
+
en: "Bhadro",
|
|
343
|
+
short: "ভা"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
bn: "আশ্বিন",
|
|
347
|
+
en: "Ashwin",
|
|
348
|
+
short: "আ"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
bn: "কার্তিক",
|
|
352
|
+
en: "Kartik",
|
|
353
|
+
short: "কা"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
bn: "অগ্রহায়ণ",
|
|
357
|
+
en: "Ogrohayon",
|
|
358
|
+
short: "অ"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
bn: "পৌষ",
|
|
362
|
+
en: "Poush",
|
|
363
|
+
short: "পৌ"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
bn: "মাঘ",
|
|
367
|
+
en: "Magh",
|
|
368
|
+
short: "মা"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
bn: "ফাল্গুন",
|
|
372
|
+
en: "Falgun",
|
|
373
|
+
short: "ফা"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
bn: "চৈত্র",
|
|
377
|
+
en: "Choitro",
|
|
378
|
+
short: "চৈ"
|
|
379
|
+
}
|
|
380
|
+
]);
|
|
381
|
+
|
|
382
|
+
//#endregion
|
|
383
|
+
Object.defineProperty(exports, 'BN_DAYS', {
|
|
384
|
+
enumerable: true,
|
|
385
|
+
get: function () {
|
|
386
|
+
return BN_DAYS;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
Object.defineProperty(exports, 'BN_MONTHS', {
|
|
390
|
+
enumerable: true,
|
|
391
|
+
get: function () {
|
|
392
|
+
return BN_MONTHS;
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
Object.defineProperty(exports, 'BN_MONTH_TABLES', {
|
|
396
|
+
enumerable: true,
|
|
397
|
+
get: function () {
|
|
398
|
+
return BN_MONTH_TABLES;
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
Object.defineProperty(exports, 'BN_SEASONS', {
|
|
402
|
+
enumerable: true,
|
|
403
|
+
get: function () {
|
|
404
|
+
return BN_SEASONS;
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
Object.defineProperty(exports, 'DATE_PART_RANGES', {
|
|
408
|
+
enumerable: true,
|
|
409
|
+
get: function () {
|
|
410
|
+
return DATE_PART_RANGES;
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
Object.defineProperty(exports, 'DAYS', {
|
|
414
|
+
enumerable: true,
|
|
415
|
+
get: function () {
|
|
416
|
+
return DAYS;
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
Object.defineProperty(exports, 'INTERNALS', {
|
|
420
|
+
enumerable: true,
|
|
421
|
+
get: function () {
|
|
422
|
+
return INTERNALS;
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
Object.defineProperty(exports, 'MONTHS', {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
get: function () {
|
|
428
|
+
return MONTHS;
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
Object.defineProperty(exports, 'MS_MAP', {
|
|
432
|
+
enumerable: true,
|
|
433
|
+
get: function () {
|
|
434
|
+
return MS_MAP;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
Object.defineProperty(exports, 'MS_PER_DAY', {
|
|
438
|
+
enumerable: true,
|
|
439
|
+
get: function () {
|
|
440
|
+
return MS_PER_DAY;
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperty(exports, 'SORTED_TIME_FORMATS', {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function () {
|
|
446
|
+
return SORTED_TIME_FORMATS;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(exports, 'VEDIC_ZODIAC_SIGNS', {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
get: function () {
|
|
452
|
+
return VEDIC_ZODIAC_SIGNS;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(exports, 'WESTERN_ZODIAC_SIGNS', {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
get: function () {
|
|
458
|
+
return WESTERN_ZODIAC_SIGNS;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
Object.defineProperty(exports, 'ZODIAC_PRESETS', {
|
|
462
|
+
enumerable: true,
|
|
463
|
+
get: function () {
|
|
464
|
+
return ZODIAC_PRESETS;
|
|
465
|
+
}
|
|
466
|
+
});
|
package/dist/constants.cjs
CHANGED
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
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
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
|
+
const require_basic = require('./basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_timezone = require('./timezone-BNnHFgki.cjs');
|
|
20
|
+
const require_seasons = require('./seasons-B7kK88zq.cjs');
|
|
21
|
+
|
|
22
|
+
exports.AUSTRALIA_SEASONS = require_seasons.AUSTRALIA_SEASONS;
|
|
23
|
+
exports.BANGLADESH_SEASONS = require_seasons.BANGLADESH_SEASONS;
|
|
24
|
+
exports.ETHIOPIA_SEASONS = require_seasons.ETHIOPIA_SEASONS;
|
|
25
|
+
exports.IANA_TZ_IDS = require_timezone.IANA_TZ_IDS;
|
|
26
|
+
exports.INDIA_IMD_SEASONS = require_seasons.INDIA_IMD_SEASONS;
|
|
27
|
+
exports.INDIA_TAMIL_SEASONS = require_seasons.INDIA_TAMIL_SEASONS;
|
|
28
|
+
exports.INDIA_VEDIC_SEASONS = require_seasons.INDIA_VEDIC_SEASONS;
|
|
29
|
+
exports.JAPAN_SEASONS = require_seasons.JAPAN_SEASONS;
|
|
30
|
+
exports.MONTHS = require_basic.MONTHS;
|
|
31
|
+
exports.NATIVE_TZ_IDS = require_timezone.NATIVE_TZ_IDS;
|
|
32
|
+
exports.PHILIPPINES_SEASONS = require_seasons.PHILIPPINES_SEASONS;
|
|
33
|
+
exports.SEASON_PRESETS = require_seasons.SEASON_PRESETS;
|
|
34
|
+
exports.TIME_ZONES = require_timezone.TIME_ZONES;
|
|
35
|
+
exports.TIME_ZONES_NATIVE = require_timezone.TIME_ZONES_NATIVE;
|
|
36
|
+
exports.TIME_ZONE_IDS = require_timezone.TIME_ZONE_IDS;
|
|
37
|
+
exports.TIME_ZONE_LABELS = require_timezone.TIME_ZONE_LABELS;
|
|
38
|
+
exports.TZ_ABBREVIATIONS = require_timezone.TIME_ZONES;
|
|
39
|
+
exports.US_ACADEMIC_SEASONS = require_seasons.US_ACADEMIC_SEASONS;
|
|
40
|
+
exports.VEDIC_ZODIAC_SIGNS = require_basic.VEDIC_ZODIAC_SIGNS;
|
|
41
|
+
exports.WEEK_DAYS = require_basic.DAYS;
|
|
42
|
+
exports.WESTERN_SEASONS = require_seasons.DEFAULT_SEASONS;
|
|
43
|
+
exports.WESTERN_ZODIAC_SIGNS = require_basic.WESTERN_ZODIAC_SIGNS;
|
package/dist/constants.d.cts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
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 { L as VEDIC_ZODIAC_SIGNS, M as MONTHS, R as WESTERN_ZODIAC_SIGNS, _ as TIME_ZONE_LABELS, a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, f as IANA_TZ_IDS, g as TIME_ZONE_IDS, h as TIME_ZONES_NATIVE, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, m as TIME_ZONES, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, p as NATIVE_TZ_IDS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS, w as DAYS } from "./seasons-CpUn45n6.cjs";
|
|
2
18
|
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
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 { L as VEDIC_ZODIAC_SIGNS, M as MONTHS, R as WESTERN_ZODIAC_SIGNS, _ as TIME_ZONE_LABELS, a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, f as IANA_TZ_IDS, g as TIME_ZONE_IDS, h as TIME_ZONES_NATIVE, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, m as TIME_ZONES, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, p as NATIVE_TZ_IDS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS, w as DAYS } from "./seasons-B_kjFWIX.mjs";
|
|
2
18
|
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
package/dist/constants.mjs
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
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 { c as MONTHS, f as VEDIC_ZODIAC_SIGNS, o as DAYS, p as WESTERN_ZODIAC_SIGNS } from "./basic-DqKyujoj.mjs";
|
|
18
|
+
import { a as TIME_ZONE_IDS, i as TIME_ZONES_NATIVE, n as NATIVE_TZ_IDS, o as TIME_ZONE_LABELS, r as TIME_ZONES, t as IANA_TZ_IDS } from "./timezone-Db2CeL32.mjs";
|
|
19
|
+
import { a as INDIA_IMD_SEASONS, c as JAPAN_SEASONS, d as US_ACADEMIC_SEASONS, i as ETHIOPIA_SEASONS, l as PHILIPPINES_SEASONS, n as BANGLADESH_SEASONS, o as INDIA_TAMIL_SEASONS, r as DEFAULT_SEASONS, s as INDIA_VEDIC_SEASONS, t as AUSTRALIA_SEASONS, u as SEASON_PRESETS } from "./seasons-Cq3ah3pV.mjs";
|
|
20
|
+
|
|
21
|
+
export { AUSTRALIA_SEASONS, BANGLADESH_SEASONS, ETHIOPIA_SEASONS, IANA_TZ_IDS, INDIA_IMD_SEASONS, INDIA_TAMIL_SEASONS, INDIA_VEDIC_SEASONS, JAPAN_SEASONS, MONTHS, NATIVE_TZ_IDS, PHILIPPINES_SEASONS, SEASON_PRESETS, TIME_ZONES, TIME_ZONES as TZ_ABBREVIATIONS, TIME_ZONES_NATIVE, TIME_ZONE_IDS, TIME_ZONE_LABELS, US_ACADEMIC_SEASONS, VEDIC_ZODIAC_SIGNS, DAYS as WEEK_DAYS, DEFAULT_SEASONS as WESTERN_SEASONS, WESTERN_ZODIAC_SIGNS };
|
|
@@ -0,0 +1,49 @@
|
|
|
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-CtuSNmV7.cjs');
|
|
18
|
+
|
|
19
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
|
|
20
|
+
function trimString(input) {
|
|
21
|
+
if (!input) return "";
|
|
22
|
+
if (require_primitives.isNonEmptyString(input)) return input.trim().replace(/\s+/g, " ");
|
|
23
|
+
if (Array.isArray(input)) return input.map((str) => require_primitives.isNonEmptyString(str) ? str.trim().replace(/\s+/g, " ") : str);
|
|
24
|
+
throw new TypeError("Expected string or array of strings!", { cause: "Invalid Input Type" });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/convert.js
|
|
29
|
+
const reverseString = (input) => {
|
|
30
|
+
return trimString(input)?.split("")?.reverse()?.join("");
|
|
31
|
+
};
|
|
32
|
+
function formatUnitWithPlural(count, unit, withNumber = true) {
|
|
33
|
+
const pluralized = Math.abs(count) === 1 ? unit : `${unit}s`;
|
|
34
|
+
return withNumber ? `${count} ${pluralized}` : pluralized;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
Object.defineProperty(exports, 'formatUnitWithPlural', {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return formatUnitWithPlural;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, 'reverseString', {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return reverseString;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { n as isNonEmptyString } from "./primitives-dXzXlzJw.mjs";
|
|
18
|
+
|
|
19
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/basics.js
|
|
20
|
+
function trimString(input) {
|
|
21
|
+
if (!input) return "";
|
|
22
|
+
if (isNonEmptyString(input)) return input.trim().replace(/\s+/g, " ");
|
|
23
|
+
if (Array.isArray(input)) return input.map((str) => isNonEmptyString(str) ? str.trim().replace(/\s+/g, " ") : str);
|
|
24
|
+
throw new TypeError("Expected string or array of strings!", { cause: "Invalid Input Type" });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/string/convert.js
|
|
29
|
+
const reverseString = (input) => {
|
|
30
|
+
return trimString(input)?.split("")?.reverse()?.join("");
|
|
31
|
+
};
|
|
32
|
+
function formatUnitWithPlural(count, unit, withNumber = true) {
|
|
33
|
+
const pluralized = Math.abs(count) === 1 ? unit : `${unit}s`;
|
|
34
|
+
return withNumber ? `${count} ${pluralized}` : pluralized;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { reverseString as n, formatUnitWithPlural as t };
|