chronos-date 1.1.0 → 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-Dputob9z.mjs → basic-DqKyujoj.mjs} +16 -0
- package/dist/{basic-DIp_pxR2.cjs → basic-DsQqC5nZ.cjs} +16 -0
- package/dist/constants.cjs +19 -3
- package/dist/constants.d.cts +17 -1
- package/dist/constants.d.mts +17 -1
- package/dist/constants.mjs +19 -3
- package/dist/{convert-dQuGWhVm.cjs → convert-DbgntRVW.cjs} +17 -1
- package/dist/{convert-CNVL-mop.mjs → convert-mMaI4YP0.mjs} +17 -1
- package/dist/{greet-B9j4afzD.mjs → greet-D07t2_e6.mjs} +17 -1
- package/dist/{greet-B8ZtypgG.cjs → greet-hjVsd2dt.cjs} +17 -1
- package/dist/guards.cjs +32 -11
- package/dist/guards.d.cts +18 -2
- package/dist/guards.d.mts +18 -2
- package/dist/guards.mjs +32 -11
- package/dist/{helpers-M_SfAbAv.cjs → helpers-CQzi908i.cjs} +20 -4
- package/dist/{helpers-CrMc9iJZ.mjs → helpers-DEf4sevD.mjs} +20 -4
- package/dist/index.cjs +29 -13
- package/dist/index.d.cts +18 -2
- package/dist/index.d.mts +18 -2
- package/dist/index.mjs +30 -14
- package/dist/{non-primitives-CT4vszrX.cjs → non-primitives-D9zxCwX8.cjs} +16 -0
- package/dist/{non-primitives-DrQfPj1r.mjs → non-primitives-DBtomDty.mjs} +16 -0
- package/dist/plugins/banglaPlugin.cjs +21 -5
- package/dist/plugins/banglaPlugin.d.cts +19 -3
- package/dist/plugins/banglaPlugin.d.mts +19 -3
- package/dist/plugins/banglaPlugin.mjs +21 -5
- package/dist/plugins/businessPlugin.cjs +19 -3
- package/dist/plugins/businessPlugin.d.cts +17 -1
- package/dist/plugins/businessPlugin.d.mts +17 -1
- package/dist/plugins/businessPlugin.mjs +19 -3
- package/dist/plugins/dateRangePlugin.cjs +19 -3
- package/dist/plugins/dateRangePlugin.d.cts +19 -3
- package/dist/plugins/dateRangePlugin.d.mts +19 -3
- package/dist/plugins/dateRangePlugin.mjs +19 -3
- package/dist/plugins/dayPartPlugin.cjs +18 -2
- package/dist/plugins/dayPartPlugin.d.cts +17 -1
- package/dist/plugins/dayPartPlugin.d.mts +17 -1
- package/dist/plugins/dayPartPlugin.mjs +18 -2
- package/dist/plugins/durationPlugin.cjs +17 -1
- package/dist/plugins/durationPlugin.d.cts +17 -1
- package/dist/plugins/durationPlugin.d.mts +17 -1
- package/dist/plugins/durationPlugin.mjs +17 -1
- package/dist/plugins/fromNowPlugin.cjs +18 -2
- package/dist/plugins/fromNowPlugin.d.cts +17 -1
- package/dist/plugins/fromNowPlugin.d.mts +17 -1
- package/dist/plugins/fromNowPlugin.mjs +18 -2
- package/dist/plugins/greetingPlugin.cjs +17 -1
- package/dist/plugins/greetingPlugin.d.cts +17 -1
- package/dist/plugins/greetingPlugin.d.mts +17 -1
- package/dist/plugins/greetingPlugin.mjs +17 -1
- package/dist/plugins/palindromePlugin.cjs +17 -1
- package/dist/plugins/palindromePlugin.d.cts +17 -1
- package/dist/plugins/palindromePlugin.d.mts +17 -1
- package/dist/plugins/palindromePlugin.mjs +17 -1
- package/dist/plugins/relativeTimePlugin.cjs +17 -1
- package/dist/plugins/relativeTimePlugin.d.cts +17 -1
- package/dist/plugins/relativeTimePlugin.d.mts +17 -1
- package/dist/plugins/relativeTimePlugin.mjs +17 -1
- package/dist/plugins/roundPlugin.cjs +18 -2
- package/dist/plugins/roundPlugin.d.cts +17 -1
- package/dist/plugins/roundPlugin.d.mts +17 -1
- package/dist/plugins/roundPlugin.mjs +18 -2
- package/dist/plugins/seasonPlugin.cjs +17 -1
- package/dist/plugins/seasonPlugin.d.cts +17 -1
- package/dist/plugins/seasonPlugin.d.mts +17 -1
- package/dist/plugins/seasonPlugin.mjs +17 -1
- package/dist/plugins/timeZonePlugin.cjs +20 -4
- package/dist/plugins/timeZonePlugin.d.cts +17 -1
- package/dist/plugins/timeZonePlugin.d.mts +17 -1
- package/dist/plugins/timeZonePlugin.mjs +20 -4
- package/dist/plugins/zodiacPlugin.cjs +18 -2
- package/dist/plugins/zodiacPlugin.d.cts +17 -1
- package/dist/plugins/zodiacPlugin.d.mts +17 -1
- package/dist/plugins/zodiacPlugin.mjs +18 -2
- package/dist/{primitives-BME3_QrA.cjs → primitives-CtuSNmV7.cjs} +16 -0
- package/dist/primitives-dXzXlzJw.mjs +35 -0
- package/dist/{seasons-CcZicoe1.cjs → seasons-B7kK88zq.cjs} +16 -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-CHnjrIKK.mjs → seasons-Cq3ah3pV.mjs} +16 -0
- package/dist/{timezone-DYVJJYKz.cjs → timezone-BNnHFgki.cjs} +16 -0
- package/dist/{timezone-BfBXeMK_.mjs → timezone-Db2CeL32.mjs} +16 -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 +16 -0
- package/dist/{utilities-CtOZhIYv.mjs → utilities-BGX8dviZ.mjs} +21 -5
- package/dist/{utilities-BU4MSYS7.mjs → utilities-BKtVo78T.mjs} +17 -1
- package/dist/{utilities-CGL7F6R9.cjs → utilities-CpF3uys3.cjs} +17 -1
- package/dist/{utilities-bXwTPJaD.cjs → utilities-D47SN9EZ.cjs} +21 -5
- package/dist/utils.cjs +21 -5
- package/dist/utils.d.cts +20 -4
- package/dist/utils.d.mts +20 -4
- package/dist/utils.mjs +21 -5
- package/package.json +10 -4
- package/dist/primitives-DEt6I7Sy.mjs +0 -19
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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, o as DAYS, s as INTERNALS, u as MS_PER_DAY } from "./basic-DqKyujoj.mjs";
|
|
18
|
+
import { r as isNumber } from "./primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { t as isFunction } from "./non-primitives-DBtomDty.mjs";
|
|
20
|
+
import { isDateString, isLeapYear } from "./guards.mjs";
|
|
21
|
+
import { c as _hasChronosProperties, n as _dateArgsToDate, p as _resolveNativeTzName, r as _formatDate, u as _normalizeOffset } from "./helpers-DEf4sevD.mjs";
|
|
22
|
+
import { l as getNativeTimeZoneId, r as extractMinutesFromUTC } from "./utilities-BGX8dviZ.mjs";
|
|
7
23
|
|
|
8
24
|
//#region src/utils/chronos-fn.ts
|
|
9
25
|
/**
|
|
@@ -1218,8 +1234,8 @@ var Chronos = class Chronos {
|
|
|
1218
1234
|
}
|
|
1219
1235
|
/**
|
|
1220
1236
|
* @static Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).
|
|
1221
|
-
* * It basically calls {@link Date.now()}.
|
|
1222
1237
|
* @returns The number of milliseconds elapsed since the Unix epoch.
|
|
1238
|
+
* @remarks It internally uses {@link Date.now()}.
|
|
1223
1239
|
*/
|
|
1224
1240
|
static now() {
|
|
1225
1241
|
return Date.now();
|
|
@@ -1344,12 +1360,12 @@ var Chronos = class Chronos {
|
|
|
1344
1360
|
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
1345
1361
|
* - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
|
|
1346
1362
|
*
|
|
1347
|
-
* @
|
|
1348
|
-
* This method accepts different types of date inputs and extracts the year to check if it's a leap year.
|
|
1349
|
-
* If the provided date is a `number`, it will be treated as a year (must be a valid year from 0 to 9999).
|
|
1350
|
-
* If the year is out of this range (negative or larger than 9999), it will be treated as a Unix timestamp.
|
|
1351
|
-
* If the provided date is a string or a `Date` object, it will be parsed and the year will be extracted.
|
|
1352
|
-
* If a `Chronos` instance is passed, the year will be directly accessed from the instance.
|
|
1363
|
+
* @remarks
|
|
1364
|
+
* - This method accepts different types of date inputs and extracts the year to check if it's a leap year.
|
|
1365
|
+
* - If the provided date is a `number`, it will be treated as a year (must be a valid year from 0 to 9999).
|
|
1366
|
+
* - If the year is out of this range (negative or larger than 9999), it will be treated as a Unix timestamp.
|
|
1367
|
+
* - If the provided date is a string or a `Date` object, it will be parsed and the year will be extracted.
|
|
1368
|
+
* - If a `Chronos` instance is passed, the year will be directly accessed from the instance.
|
|
1353
1369
|
*
|
|
1354
1370
|
* @param date - A `number` (year or Unix timestamp), `string`, `Date`, or `Chronos` instance representing a date.
|
|
1355
1371
|
* @returns `true` if the year is a leap year, `false` otherwise.
|
|
@@ -1379,7 +1395,7 @@ var Chronos = class Chronos {
|
|
|
1379
1395
|
* @returns `true` if the value is a valid date string, otherwise `false`.
|
|
1380
1396
|
*/
|
|
1381
1397
|
static isDateString(value) {
|
|
1382
|
-
return
|
|
1398
|
+
return isDateString(value);
|
|
1383
1399
|
}
|
|
1384
1400
|
/**
|
|
1385
1401
|
* @static Checks if the given value is an instance of `Chronos`.
|
|
@@ -1,3 +1,19 @@
|
|
|
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
|
+
|
|
1
17
|
|
|
2
18
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
|
|
3
19
|
function isArray(value) {
|
|
@@ -1,3 +1,19 @@
|
|
|
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
|
+
|
|
1
17
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
|
|
2
18
|
function isArray(value) {
|
|
3
19
|
return Array.isArray(value);
|
|
@@ -1,8 +1,24 @@
|
|
|
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
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('../basic-
|
|
3
|
-
const require_primitives = require('../primitives-
|
|
4
|
-
const require_utilities = require('../utilities-
|
|
5
|
-
const require_helpers = require('../helpers-
|
|
18
|
+
const require_basic = require('../basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_primitives = require('../primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_utilities = require('../utilities-CpF3uys3.cjs');
|
|
21
|
+
const require_helpers = require('../helpers-CQzi908i.cjs');
|
|
6
22
|
|
|
7
23
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
|
|
8
24
|
function digitToBangla(digit, preserveNonDigit = true) {
|
|
@@ -28,7 +44,7 @@ const banglaPlugin = ($Chronos) => {
|
|
|
28
44
|
function $bnDaysMonthIdx(date, variant) {
|
|
29
45
|
return require_helpers._bnDaysMonthIdx(date, variant ?? DEFAULT_CONFIG.get("config")?.variant);
|
|
30
46
|
}
|
|
31
|
-
$Chronos.prototype
|
|
47
|
+
$Chronos.prototype.$configureBangla = function(configs) {
|
|
32
48
|
DEFAULT_CONFIG.set("config", configs);
|
|
33
49
|
};
|
|
34
50
|
$Chronos.prototype.getBanglaYear = function(locale = "bn") {
|
|
@@ -1,4 +1,20 @@
|
|
|
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 { $t as BanglaDayName, C as $Chronos, Ht as $BanglaMonth, Kt as $BnEn, Qt as BanglaDateOptions, Ut as $BanglaMonthDate, Wt as $BanglaYear, Zt as BanglaDateObject, gn as StrictFormat, in as BnCalendarConfig, nn as BanglaSeasonName, tn as BanglaMonthName } from "../types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/banglaPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -208,7 +224,7 @@ declare module 'chronos-date' {
|
|
|
208
224
|
* c2.getBanglaMonth(); // uses 'revised-2019'
|
|
209
225
|
*
|
|
210
226
|
* // Set the global default to 1966 variant
|
|
211
|
-
* c1
|
|
227
|
+
* c1.$configureBangla({ variant: 'revised-1966' });
|
|
212
228
|
*
|
|
213
229
|
* c1.getBanglaMonth(); // now uses 'revised-1966'
|
|
214
230
|
* c2.getBanglaMonth(); // also uses 'revised-1966'
|
|
@@ -216,7 +232,7 @@ declare module 'chronos-date' {
|
|
|
216
232
|
* // Per-call override still works
|
|
217
233
|
* c1.getBanglaMonth({ variant: 'revised-2019' }); // uses 'revised-2019' just for this call
|
|
218
234
|
*/
|
|
219
|
-
|
|
235
|
+
$configureBangla(options: BnCalendarConfig): void;
|
|
220
236
|
}
|
|
221
237
|
}
|
|
222
238
|
/** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 { $t as BanglaDayName, C as $Chronos, Ht as $BanglaMonth, Kt as $BnEn, Qt as BanglaDateOptions, Ut as $BanglaMonthDate, Wt as $BanglaYear, Zt as BanglaDateObject, gn as StrictFormat, in as BnCalendarConfig, nn as BanglaSeasonName, tn as BanglaMonthName } from "../types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/banglaPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -208,7 +224,7 @@ declare module 'chronos-date' {
|
|
|
208
224
|
* c2.getBanglaMonth(); // uses 'revised-2019'
|
|
209
225
|
*
|
|
210
226
|
* // Set the global default to 1966 variant
|
|
211
|
-
* c1
|
|
227
|
+
* c1.$configureBangla({ variant: 'revised-1966' });
|
|
212
228
|
*
|
|
213
229
|
* c1.getBanglaMonth(); // now uses 'revised-1966'
|
|
214
230
|
* c2.getBanglaMonth(); // also uses 'revised-1966'
|
|
@@ -216,7 +232,7 @@ declare module 'chronos-date' {
|
|
|
216
232
|
* // Per-call override still works
|
|
217
233
|
* c1.getBanglaMonth({ variant: 'revised-2019' }); // uses 'revised-2019' just for this call
|
|
218
234
|
*/
|
|
219
|
-
|
|
235
|
+
$configureBangla(options: BnCalendarConfig): void;
|
|
220
236
|
}
|
|
221
237
|
}
|
|
222
238
|
/** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 BN_MONTHS, s as INTERNALS, t as BN_DAYS } from "../basic-DqKyujoj.mjs";
|
|
18
|
+
import { n as isNonEmptyString, r as isNumber } from "../primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { a as isNumericString, i as BN_DIGITS } from "../utilities-BKtVo78T.mjs";
|
|
20
|
+
import { a as _getBnSeason, d as _padShunno, i as _formatDateCore, l as _isBnLeapYear, o as _getBnYear, t as _bnDaysMonthIdx } from "../helpers-DEf4sevD.mjs";
|
|
5
21
|
|
|
6
22
|
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
|
|
7
23
|
function digitToBangla(digit, preserveNonDigit = true) {
|
|
@@ -27,7 +43,7 @@ const banglaPlugin = ($Chronos) => {
|
|
|
27
43
|
function $bnDaysMonthIdx(date, variant) {
|
|
28
44
|
return _bnDaysMonthIdx(date, variant ?? DEFAULT_CONFIG.get("config")?.variant);
|
|
29
45
|
}
|
|
30
|
-
$Chronos.prototype
|
|
46
|
+
$Chronos.prototype.$configureBangla = function(configs) {
|
|
31
47
|
DEFAULT_CONFIG.set("config", configs);
|
|
32
48
|
};
|
|
33
49
|
$Chronos.prototype.getBanglaYear = function(locale = "bn") {
|
|
@@ -1,7 +1,23 @@
|
|
|
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
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('../basic-
|
|
3
|
-
const require_primitives = require('../primitives-
|
|
4
|
-
const require_non_primitives = require('../non-primitives-
|
|
18
|
+
const require_basic = require('../basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_primitives = require('../primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_non_primitives = require('../non-primitives-D9zxCwX8.cjs');
|
|
5
21
|
|
|
6
22
|
//#region src/plugins/businessPlugin.ts
|
|
7
23
|
/** * Plugin to inject `business` related methods */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, Cn as Enumerate, D as ChronosInput, En as RangeTuple, a as BusinessOptionsWeekends, i as BusinessOptionsBasic, r as AcademicYear, wn as NumberRange, wt as Quarter } from "../types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/businessPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, Cn as Enumerate, D as ChronosInput, En as RangeTuple, a as BusinessOptionsWeekends, i as BusinessOptionsBasic, r as AcademicYear, wn as NumberRange, wt as Quarter } from "../types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/businessPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 { s as INTERNALS } from "../basic-DqKyujoj.mjs";
|
|
18
|
+
import { a as isUndefined } from "../primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { a as isValidArray } from "../non-primitives-DBtomDty.mjs";
|
|
4
20
|
|
|
5
21
|
//#region src/plugins/businessPlugin.ts
|
|
6
22
|
/** * Plugin to inject `business` related methods */
|
|
@@ -1,7 +1,23 @@
|
|
|
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
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('../basic-
|
|
3
|
-
const require_primitives = require('../primitives-
|
|
4
|
-
const require_non_primitives = require('../non-primitives-
|
|
18
|
+
const require_basic = require('../basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_primitives = require('../primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_non_primitives = require('../non-primitives-D9zxCwX8.cjs');
|
|
5
21
|
|
|
6
22
|
//#region src/plugins/dateRangePlugin.ts
|
|
7
23
|
/** * Plugin to inject `getDatesInRange` related method */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/dateRangePlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -34,7 +50,7 @@ declare module 'chronos-date' {
|
|
|
34
50
|
* new Chronos().getDatesInRange({ span: 2, unit: 'day', format: 'utc' });
|
|
35
51
|
* // → ['2025-06-16T00:00:00.000Z', '2025-06-17T00:00:00.000Z']
|
|
36
52
|
*/
|
|
37
|
-
getDatesInRange(options?: RangeWithDates):
|
|
53
|
+
getDatesInRange(options?: RangeWithDates): ISODateTimeString<'local' | 'utc'>[];
|
|
38
54
|
/**
|
|
39
55
|
* @instance Returns an array of ISO date-time strings within a specific date range.
|
|
40
56
|
*
|
|
@@ -62,7 +78,7 @@ declare module 'chronos-date' {
|
|
|
62
78
|
* new Chronos().getDatesInRange({ from: '2025-01-01', to: '2025-01-03' });
|
|
63
79
|
* // → ['2025-01-01T00:00:00+06:00', '2025-01-02T00:00:00+06:00', '2025-01-03T00:00:00+06:00']
|
|
64
80
|
*/
|
|
65
|
-
getDatesInRange(options?: RelativeDateRange):
|
|
81
|
+
getDatesInRange(options?: RelativeDateRange): ISODateTimeString<'local' | 'utc'>[];
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
84
|
/** * Plugin to inject `getDatesInRange` related method */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, I as RangeWithDates, L as RelativeDateRange, mt as ISODateTimeString } from "../types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/dateRangePlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -34,7 +50,7 @@ declare module 'chronos-date' {
|
|
|
34
50
|
* new Chronos().getDatesInRange({ span: 2, unit: 'day', format: 'utc' });
|
|
35
51
|
* // → ['2025-06-16T00:00:00.000Z', '2025-06-17T00:00:00.000Z']
|
|
36
52
|
*/
|
|
37
|
-
getDatesInRange(options?: RangeWithDates):
|
|
53
|
+
getDatesInRange(options?: RangeWithDates): ISODateTimeString<'local' | 'utc'>[];
|
|
38
54
|
/**
|
|
39
55
|
* @instance Returns an array of ISO date-time strings within a specific date range.
|
|
40
56
|
*
|
|
@@ -62,7 +78,7 @@ declare module 'chronos-date' {
|
|
|
62
78
|
* new Chronos().getDatesInRange({ from: '2025-01-01', to: '2025-01-03' });
|
|
63
79
|
* // → ['2025-01-01T00:00:00+06:00', '2025-01-02T00:00:00+06:00', '2025-01-03T00:00:00+06:00']
|
|
64
80
|
*/
|
|
65
|
-
getDatesInRange(options?: RelativeDateRange):
|
|
81
|
+
getDatesInRange(options?: RelativeDateRange): ISODateTimeString<'local' | 'utc'>[];
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
84
|
/** * Plugin to inject `getDatesInRange` related method */
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 { o as DAYS, s as INTERNALS, u as MS_PER_DAY } from "../basic-DqKyujoj.mjs";
|
|
18
|
+
import { r as isNumber } from "../primitives-dXzXlzJw.mjs";
|
|
19
|
+
import { a as isValidArray } from "../non-primitives-DBtomDty.mjs";
|
|
4
20
|
|
|
5
21
|
//#region src/plugins/dateRangePlugin.ts
|
|
6
22
|
/** * Plugin to inject `getDatesInRange` related method */
|
|
@@ -1,6 +1,22 @@
|
|
|
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
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('../basic-
|
|
3
|
-
const require_non_primitives = require('../non-primitives-
|
|
18
|
+
const require_basic = require('../basic-DsQqC5nZ.cjs');
|
|
19
|
+
const require_non_primitives = require('../non-primitives-D9zxCwX8.cjs');
|
|
4
20
|
|
|
5
21
|
//#region src/plugins/dayPartPlugin.ts
|
|
6
22
|
/** * Plugin to inject `getPartOfDay` method */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, c as DayPart, l as DayPartConfig } from "../types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/dayPartPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, c as DayPart, l as DayPartConfig } from "../types-Cb4gxrgJ.mjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/dayPartPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { a as DATE_PART_RANGES } from "../basic-DqKyujoj.mjs";
|
|
18
|
+
import { n as isNotEmptyObject } from "../non-primitives-DBtomDty.mjs";
|
|
3
19
|
|
|
4
20
|
//#region src/plugins/dayPartPlugin.ts
|
|
5
21
|
/** * Plugin to inject `getPartOfDay` method */
|
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
1
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_basic = require('../basic-
|
|
18
|
+
const require_basic = require('../basic-DsQqC5nZ.cjs');
|
|
3
19
|
|
|
4
20
|
//#region src/plugins/durationPlugin.ts
|
|
5
21
|
/** * Plugin to inject `duration` related methods */
|
|
@@ -1,4 +1,20 @@
|
|
|
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 $Chronos, D as ChronosInput, d as DurationOptions, g as TimeDuration } from "../types-CdmsXbU_.cjs";
|
|
2
18
|
|
|
3
19
|
//#region src/plugins/durationPlugin.d.ts
|
|
4
20
|
declare module 'chronos-date' {
|