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,68 @@
|
|
|
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 node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
|
|
19
|
+
function isArray(value) {
|
|
20
|
+
return Array.isArray(value);
|
|
21
|
+
}
|
|
22
|
+
function isValidArray(value) {
|
|
23
|
+
return Array.isArray(value) && value?.length > 0;
|
|
24
|
+
}
|
|
25
|
+
function isObject(value) {
|
|
26
|
+
return value !== null && typeof value === "object" && !isArray(value);
|
|
27
|
+
}
|
|
28
|
+
function isNotEmptyObject(value) {
|
|
29
|
+
return isObject(value) && Object.keys(value)?.length > 0;
|
|
30
|
+
}
|
|
31
|
+
function isObjectWithKeys(value, keys) {
|
|
32
|
+
return isObject(value) && keys?.every((key) => key in value);
|
|
33
|
+
}
|
|
34
|
+
function isFunction(value) {
|
|
35
|
+
return typeof value === "function";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
Object.defineProperty(exports, 'isFunction', {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return isFunction;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, 'isNotEmptyObject', {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return isNotEmptyObject;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, 'isObject', {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return isObject;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, 'isObjectWithKeys', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return isObjectWithKeys;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, 'isValidArray', {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () {
|
|
66
|
+
return isValidArray;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
@@ -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
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/guards/non-primitives.js
|
|
18
|
+
function isArray(value) {
|
|
19
|
+
return Array.isArray(value);
|
|
20
|
+
}
|
|
21
|
+
function isValidArray(value) {
|
|
22
|
+
return Array.isArray(value) && value?.length > 0;
|
|
23
|
+
}
|
|
24
|
+
function isObject(value) {
|
|
25
|
+
return value !== null && typeof value === "object" && !isArray(value);
|
|
26
|
+
}
|
|
27
|
+
function isNotEmptyObject(value) {
|
|
28
|
+
return isObject(value) && Object.keys(value)?.length > 0;
|
|
29
|
+
}
|
|
30
|
+
function isObjectWithKeys(value, keys) {
|
|
31
|
+
return isObject(value) && keys?.every((key) => key in value);
|
|
32
|
+
}
|
|
33
|
+
function isFunction(value) {
|
|
34
|
+
return typeof value === "function";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { isValidArray as a, isObjectWithKeys as i, isNotEmptyObject as n, isObject as r, isFunction as t };
|
|
@@ -1 +1,137 @@
|
|
|
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_primitives = require('../primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_utilities = require('../utilities-CpF3uys3.cjs');
|
|
21
|
+
const require_helpers = require('../helpers-CQzi908i.cjs');
|
|
22
|
+
|
|
23
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
|
|
24
|
+
function digitToBangla(digit, preserveNonDigit = true) {
|
|
25
|
+
const banglaDigits = Object.keys(require_utilities.BN_DIGITS);
|
|
26
|
+
const _matchAndConvert = (value) => {
|
|
27
|
+
return value.replace(/\d/g, (dig) => banglaDigits[Number(dig)]);
|
|
28
|
+
};
|
|
29
|
+
if (require_primitives.isNumber(digit)) return _matchAndConvert(String(digit));
|
|
30
|
+
if (require_primitives.isNonEmptyString(digit)) {
|
|
31
|
+
const bnDigStr = _matchAndConvert(digit);
|
|
32
|
+
if (preserveNonDigit || require_utilities.isNumericString(digit)) return bnDigStr;
|
|
33
|
+
return bnDigStr.split("").filter((dig) => banglaDigits.includes(dig)).join("");
|
|
34
|
+
}
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/plugins/banglaPlugin.ts
|
|
40
|
+
/** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
|
|
41
|
+
const banglaPlugin = ($Chronos) => {
|
|
42
|
+
const { internalDate: $Date } = $Chronos[require_basic.INTERNALS];
|
|
43
|
+
const DEFAULT_CONFIG = /* @__PURE__ */ new Map();
|
|
44
|
+
function $bnDaysMonthIdx(date, variant) {
|
|
45
|
+
return require_helpers._bnDaysMonthIdx(date, variant ?? DEFAULT_CONFIG.get("config")?.variant);
|
|
46
|
+
}
|
|
47
|
+
$Chronos.prototype.$configureBangla = function(configs) {
|
|
48
|
+
DEFAULT_CONFIG.set("config", configs);
|
|
49
|
+
};
|
|
50
|
+
$Chronos.prototype.getBanglaYear = function(locale = "bn") {
|
|
51
|
+
const bnYear = require_helpers._getBnYear($Date(this));
|
|
52
|
+
return locale === "en" ? bnYear : digitToBangla(bnYear);
|
|
53
|
+
};
|
|
54
|
+
$Chronos.prototype.getBanglaMonth = function(options) {
|
|
55
|
+
const { locale = "bn", variant } = options ?? {};
|
|
56
|
+
const isoMonth = $bnDaysMonthIdx($Date(this), variant).monthIdx + 1;
|
|
57
|
+
return locale === "en" ? isoMonth : digitToBangla(isoMonth);
|
|
58
|
+
};
|
|
59
|
+
$Chronos.prototype.getBanglaDay = function(options) {
|
|
60
|
+
const { locale = "bn", variant } = options ?? {};
|
|
61
|
+
const date = $bnDaysMonthIdx($Date(this), variant).days + 1;
|
|
62
|
+
return locale === "en" ? date : digitToBangla(date);
|
|
63
|
+
};
|
|
64
|
+
$Chronos.prototype.getBanglaDayName = function(locale = "bn") {
|
|
65
|
+
const DAY = require_basic.BN_DAYS[this.weekDay];
|
|
66
|
+
return locale === "en" ? DAY.en : DAY.bn;
|
|
67
|
+
};
|
|
68
|
+
$Chronos.prototype.getBanglaMonthName = function(options) {
|
|
69
|
+
const { locale = "bn", variant } = options ?? {};
|
|
70
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
71
|
+
const MONTH = require_basic.BN_MONTHS[monthIdx];
|
|
72
|
+
return locale === "en" ? MONTH.en : MONTH.bn;
|
|
73
|
+
};
|
|
74
|
+
$Chronos.prototype.getBanglaSeasonName = function(options) {
|
|
75
|
+
const { locale, variant } = options ?? {};
|
|
76
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
77
|
+
return require_helpers._getBnSeason(monthIdx, locale);
|
|
78
|
+
};
|
|
79
|
+
$Chronos.prototype.toBangla = function(opts) {
|
|
80
|
+
return {
|
|
81
|
+
year: this.getBanglaYear(opts?.locale),
|
|
82
|
+
month: this.getBanglaMonth(opts),
|
|
83
|
+
date: this.getBanglaDay(opts),
|
|
84
|
+
monthName: this.getBanglaMonthName(opts),
|
|
85
|
+
dayName: this.getBanglaDayName(opts?.locale),
|
|
86
|
+
seasonName: this.getBanglaSeasonName(opts),
|
|
87
|
+
isLeapYear: require_helpers._isBnLeapYear(require_helpers._getBnYear($Date(this)), this.year, opts?.variant)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
$Chronos.prototype.formatBangla = function(fmt, opts) {
|
|
91
|
+
const { hour, minute, second, millisecond } = this;
|
|
92
|
+
const D_NAME = require_basic.BN_DAYS[this.weekDay];
|
|
93
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), opts?.variant);
|
|
94
|
+
const M_NAME = require_basic.BN_MONTHS[monthIdx];
|
|
95
|
+
const month = this.getBanglaMonth();
|
|
96
|
+
const year = require_helpers._padShunno(this.getBanglaYear(), 4);
|
|
97
|
+
const date = this.getBanglaDay();
|
|
98
|
+
const seasonName = this.getBanglaSeasonName();
|
|
99
|
+
const offset = digitToBangla(this.getTimeZoneOffset());
|
|
100
|
+
const dateComponents = {
|
|
101
|
+
YYYY: year,
|
|
102
|
+
YY: year.slice(-2),
|
|
103
|
+
yyyy: year,
|
|
104
|
+
yy: year.slice(-2),
|
|
105
|
+
M: month,
|
|
106
|
+
MM: require_helpers._padShunno(month),
|
|
107
|
+
mmm: M_NAME.short,
|
|
108
|
+
mmmm: M_NAME.bn,
|
|
109
|
+
d: D_NAME.short,
|
|
110
|
+
dd: D_NAME.bn.replace("বার", ""),
|
|
111
|
+
ddd: D_NAME.bn,
|
|
112
|
+
D: date,
|
|
113
|
+
DD: require_helpers._padShunno(date),
|
|
114
|
+
Do: date,
|
|
115
|
+
H: digitToBangla(hour),
|
|
116
|
+
HH: require_helpers._padShunno(digitToBangla(hour)),
|
|
117
|
+
h: digitToBangla(hour % 12 || 12),
|
|
118
|
+
hh: require_helpers._padShunno(digitToBangla(hour % 12 || 12)),
|
|
119
|
+
m: digitToBangla(minute),
|
|
120
|
+
mm: require_helpers._padShunno(digitToBangla(minute)),
|
|
121
|
+
s: digitToBangla(second),
|
|
122
|
+
ss: require_helpers._padShunno(digitToBangla(second)),
|
|
123
|
+
ms: digitToBangla(millisecond),
|
|
124
|
+
mss: require_helpers._padShunno(digitToBangla(millisecond), 3),
|
|
125
|
+
a: hour < 12 ? "পূর্বাহ্ণ" : "অপরাহ্ণ",
|
|
126
|
+
A: hour < 12 ? "পূর্বাহ্ণ" : "অপরাহ্ণ",
|
|
127
|
+
Z: offset,
|
|
128
|
+
ZZ: offset,
|
|
129
|
+
S: seasonName,
|
|
130
|
+
SS: seasonName + "কাল"
|
|
131
|
+
};
|
|
132
|
+
return require_helpers._formatDateCore(fmt || "ddd, DD mmmm (SS), YYYY বঙ্গাব্দ - hh:mm:ss (A)", dateComponents);
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
exports.banglaPlugin = banglaPlugin;
|
|
@@ -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 +1,136 @@
|
|
|
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 { 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";
|
|
21
|
+
|
|
22
|
+
//#region node_modules/.pnpm/nhb-toolbox@4.30.1/node_modules/nhb-toolbox/dist/esm/number/convert.js
|
|
23
|
+
function digitToBangla(digit, preserveNonDigit = true) {
|
|
24
|
+
const banglaDigits = Object.keys(BN_DIGITS);
|
|
25
|
+
const _matchAndConvert = (value) => {
|
|
26
|
+
return value.replace(/\d/g, (dig) => banglaDigits[Number(dig)]);
|
|
27
|
+
};
|
|
28
|
+
if (isNumber(digit)) return _matchAndConvert(String(digit));
|
|
29
|
+
if (isNonEmptyString(digit)) {
|
|
30
|
+
const bnDigStr = _matchAndConvert(digit);
|
|
31
|
+
if (preserveNonDigit || isNumericString(digit)) return bnDigStr;
|
|
32
|
+
return bnDigStr.split("").filter((dig) => banglaDigits.includes(dig)).join("");
|
|
33
|
+
}
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/plugins/banglaPlugin.ts
|
|
39
|
+
/** * Plugin to inject methods related to Bangla calendar system (`Bongabdo`) */
|
|
40
|
+
const banglaPlugin = ($Chronos) => {
|
|
41
|
+
const { internalDate: $Date } = $Chronos[INTERNALS];
|
|
42
|
+
const DEFAULT_CONFIG = /* @__PURE__ */ new Map();
|
|
43
|
+
function $bnDaysMonthIdx(date, variant) {
|
|
44
|
+
return _bnDaysMonthIdx(date, variant ?? DEFAULT_CONFIG.get("config")?.variant);
|
|
45
|
+
}
|
|
46
|
+
$Chronos.prototype.$configureBangla = function(configs) {
|
|
47
|
+
DEFAULT_CONFIG.set("config", configs);
|
|
48
|
+
};
|
|
49
|
+
$Chronos.prototype.getBanglaYear = function(locale = "bn") {
|
|
50
|
+
const bnYear = _getBnYear($Date(this));
|
|
51
|
+
return locale === "en" ? bnYear : digitToBangla(bnYear);
|
|
52
|
+
};
|
|
53
|
+
$Chronos.prototype.getBanglaMonth = function(options) {
|
|
54
|
+
const { locale = "bn", variant } = options ?? {};
|
|
55
|
+
const isoMonth = $bnDaysMonthIdx($Date(this), variant).monthIdx + 1;
|
|
56
|
+
return locale === "en" ? isoMonth : digitToBangla(isoMonth);
|
|
57
|
+
};
|
|
58
|
+
$Chronos.prototype.getBanglaDay = function(options) {
|
|
59
|
+
const { locale = "bn", variant } = options ?? {};
|
|
60
|
+
const date = $bnDaysMonthIdx($Date(this), variant).days + 1;
|
|
61
|
+
return locale === "en" ? date : digitToBangla(date);
|
|
62
|
+
};
|
|
63
|
+
$Chronos.prototype.getBanglaDayName = function(locale = "bn") {
|
|
64
|
+
const DAY = BN_DAYS[this.weekDay];
|
|
65
|
+
return locale === "en" ? DAY.en : DAY.bn;
|
|
66
|
+
};
|
|
67
|
+
$Chronos.prototype.getBanglaMonthName = function(options) {
|
|
68
|
+
const { locale = "bn", variant } = options ?? {};
|
|
69
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
70
|
+
const MONTH = BN_MONTHS[monthIdx];
|
|
71
|
+
return locale === "en" ? MONTH.en : MONTH.bn;
|
|
72
|
+
};
|
|
73
|
+
$Chronos.prototype.getBanglaSeasonName = function(options) {
|
|
74
|
+
const { locale, variant } = options ?? {};
|
|
75
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
76
|
+
return _getBnSeason(monthIdx, locale);
|
|
77
|
+
};
|
|
78
|
+
$Chronos.prototype.toBangla = function(opts) {
|
|
79
|
+
return {
|
|
80
|
+
year: this.getBanglaYear(opts?.locale),
|
|
81
|
+
month: this.getBanglaMonth(opts),
|
|
82
|
+
date: this.getBanglaDay(opts),
|
|
83
|
+
monthName: this.getBanglaMonthName(opts),
|
|
84
|
+
dayName: this.getBanglaDayName(opts?.locale),
|
|
85
|
+
seasonName: this.getBanglaSeasonName(opts),
|
|
86
|
+
isLeapYear: _isBnLeapYear(_getBnYear($Date(this)), this.year, opts?.variant)
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
$Chronos.prototype.formatBangla = function(fmt, opts) {
|
|
90
|
+
const { hour, minute, second, millisecond } = this;
|
|
91
|
+
const D_NAME = BN_DAYS[this.weekDay];
|
|
92
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), opts?.variant);
|
|
93
|
+
const M_NAME = BN_MONTHS[monthIdx];
|
|
94
|
+
const month = this.getBanglaMonth();
|
|
95
|
+
const year = _padShunno(this.getBanglaYear(), 4);
|
|
96
|
+
const date = this.getBanglaDay();
|
|
97
|
+
const seasonName = this.getBanglaSeasonName();
|
|
98
|
+
const offset = digitToBangla(this.getTimeZoneOffset());
|
|
99
|
+
const dateComponents = {
|
|
100
|
+
YYYY: year,
|
|
101
|
+
YY: year.slice(-2),
|
|
102
|
+
yyyy: year,
|
|
103
|
+
yy: year.slice(-2),
|
|
104
|
+
M: month,
|
|
105
|
+
MM: _padShunno(month),
|
|
106
|
+
mmm: M_NAME.short,
|
|
107
|
+
mmmm: M_NAME.bn,
|
|
108
|
+
d: D_NAME.short,
|
|
109
|
+
dd: D_NAME.bn.replace("বার", ""),
|
|
110
|
+
ddd: D_NAME.bn,
|
|
111
|
+
D: date,
|
|
112
|
+
DD: _padShunno(date),
|
|
113
|
+
Do: date,
|
|
114
|
+
H: digitToBangla(hour),
|
|
115
|
+
HH: _padShunno(digitToBangla(hour)),
|
|
116
|
+
h: digitToBangla(hour % 12 || 12),
|
|
117
|
+
hh: _padShunno(digitToBangla(hour % 12 || 12)),
|
|
118
|
+
m: digitToBangla(minute),
|
|
119
|
+
mm: _padShunno(digitToBangla(minute)),
|
|
120
|
+
s: digitToBangla(second),
|
|
121
|
+
ss: _padShunno(digitToBangla(second)),
|
|
122
|
+
ms: digitToBangla(millisecond),
|
|
123
|
+
mss: _padShunno(digitToBangla(millisecond), 3),
|
|
124
|
+
a: hour < 12 ? "পূর্বাহ্ণ" : "অপরাহ্ণ",
|
|
125
|
+
A: hour < 12 ? "পূর্বাহ্ণ" : "অপরাহ্ণ",
|
|
126
|
+
Z: offset,
|
|
127
|
+
ZZ: offset,
|
|
128
|
+
S: seasonName,
|
|
129
|
+
SS: seasonName + "কাল"
|
|
130
|
+
};
|
|
131
|
+
return _formatDateCore(fmt || "ddd, DD mmmm (SS), YYYY বঙ্গাব্দ - hh:mm:ss (A)", dateComponents);
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
export { banglaPlugin };
|
|
@@ -1 +1,134 @@
|
|
|
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_primitives = require('../primitives-CtuSNmV7.cjs');
|
|
20
|
+
const require_non_primitives = require('../non-primitives-D9zxCwX8.cjs');
|
|
21
|
+
|
|
22
|
+
//#region src/plugins/businessPlugin.ts
|
|
23
|
+
/** * Plugin to inject `business` related methods */
|
|
24
|
+
const businessPlugin = ($Chronos) => {
|
|
25
|
+
const { internalDate: $Date, withOrigin, cast, offset } = $Chronos[require_basic.INTERNALS];
|
|
26
|
+
/** Build weekend mask (array of booleans) based on `week definition` or weekend `length` */
|
|
27
|
+
const _buildWeekendMask = (weekDef, length) => {
|
|
28
|
+
const weekendDays = require_non_primitives.isValidArray(weekDef) ? [...weekDef].sort() : Array.from({ length }, (_, i) => (weekDef + 7 - 1 - i) % 7).sort();
|
|
29
|
+
const mask = new Array(7).fill(true);
|
|
30
|
+
for (const d of weekendDays) mask[d] = false;
|
|
31
|
+
return mask;
|
|
32
|
+
};
|
|
33
|
+
/** Count workdays (`wd=true`) or weekends(`wd=false`) given a `start weekday`, `total days`, `weekend mask` and optional `step` */
|
|
34
|
+
const _countDays = (sWeek, days, mask, step = 1, wd = true) => {
|
|
35
|
+
let total = Math.floor(days / 7) * mask.filter((m) => wd ? Boolean(m) : !m).length;
|
|
36
|
+
let dayIndex = (sWeek % 7 + 7) % 7;
|
|
37
|
+
for (let i = 0; i < days % 7; i++) {
|
|
38
|
+
if (wd ? Boolean(mask[dayIndex]) : !mask[dayIndex]) total++;
|
|
39
|
+
dayIndex = (dayIndex + step + 7) % 7;
|
|
40
|
+
}
|
|
41
|
+
return total;
|
|
42
|
+
};
|
|
43
|
+
$Chronos.prototype.isWeekend = function(wDef = 0, wLen = 2) {
|
|
44
|
+
const day = $Date(this).getDay();
|
|
45
|
+
if (require_non_primitives.isValidArray(wDef)) return wDef.includes(day);
|
|
46
|
+
const lastDayOfWeek = (wDef + 6) % 7;
|
|
47
|
+
return Array.from({ length: wLen }, (_, i) => (lastDayOfWeek - i + 7) % 7).includes(day);
|
|
48
|
+
};
|
|
49
|
+
$Chronos.prototype.isWorkday = function(wDef = 0, wLen = 2) {
|
|
50
|
+
return !this.isWeekend(wDef, wLen);
|
|
51
|
+
};
|
|
52
|
+
$Chronos.prototype.nextWorkday = function(wDef = 0, wLen = 2) {
|
|
53
|
+
let nxtWrk = this.addDays(1);
|
|
54
|
+
while (nxtWrk.isWeekend(wDef, wLen)) nxtWrk = nxtWrk.addDays(1);
|
|
55
|
+
return withOrigin(nxtWrk.startOf("day"), "nextWorkday", offset(this), this.timeZoneName, this.timeZoneId, this.$tzTracker);
|
|
56
|
+
};
|
|
57
|
+
$Chronos.prototype.previousWorkday = function(wDef = 0, wLen = 2) {
|
|
58
|
+
let prevWrk = this.addDays(-1);
|
|
59
|
+
while (prevWrk.isWeekend(wDef, wLen)) prevWrk = prevWrk.addDays(-1);
|
|
60
|
+
return withOrigin(prevWrk.startOf("day"), "previousWorkday", offset(this), this.timeZoneName, this.timeZoneId, this.$tzTracker);
|
|
61
|
+
};
|
|
62
|
+
$Chronos.prototype.nextWeekend = function(wDef = 0, wLen = 2) {
|
|
63
|
+
let nxtWknd = this.addDays(1);
|
|
64
|
+
while (!nxtWknd.isWeekend(wDef, wLen)) nxtWknd = nxtWknd.addDays(1);
|
|
65
|
+
return withOrigin(nxtWknd.startOf("day"), "nextWeekend", offset(this), this.timeZoneName, this.timeZoneId, this.$tzTracker);
|
|
66
|
+
};
|
|
67
|
+
$Chronos.prototype.previousWeekend = function(wDef = 0, wLen = 2) {
|
|
68
|
+
let prevWknd = this.addDays(-1);
|
|
69
|
+
while (!prevWknd.isWeekend(wDef, wLen)) prevWknd = prevWknd.addDays(-1);
|
|
70
|
+
return withOrigin(prevWknd.startOf("day"), "previousWeekend", offset(this), this.timeZoneName, this.timeZoneId, this.$tzTracker);
|
|
71
|
+
};
|
|
72
|
+
$Chronos.prototype.workdaysBetween = function(to, wDef = 0, wLen = 2) {
|
|
73
|
+
const end = cast(to).startOf("day");
|
|
74
|
+
const start = this.startOf("day");
|
|
75
|
+
if (start.isSame(end, "day")) return 0;
|
|
76
|
+
const step = start.isBefore(end, "day") ? 1 : -1;
|
|
77
|
+
const totalDays = Math.abs(end.diff(start, "day"));
|
|
78
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
79
|
+
return _countDays((start.isoWeekDay + step) % 7, totalDays, weekendMask, step);
|
|
80
|
+
};
|
|
81
|
+
$Chronos.prototype.weekendsBetween = function(to, wDef = 0, wLen = 2) {
|
|
82
|
+
const end = cast(to).startOf("day");
|
|
83
|
+
const start = this.startOf("day");
|
|
84
|
+
if (start.isSame(end, "day")) return 0;
|
|
85
|
+
const step = start.isBefore(end, "day") ? 1 : -1;
|
|
86
|
+
const totalDays = Math.abs(end.diff(start, "day"));
|
|
87
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
88
|
+
return _countDays((start.isoWeekDay + step) % 7, totalDays, weekendMask, step, false);
|
|
89
|
+
};
|
|
90
|
+
$Chronos.prototype.workdaysInMonth = function(wDef = 0, wLen = 2) {
|
|
91
|
+
const daysInMonth = this.daysInMonth();
|
|
92
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
93
|
+
return _countDays(this.startOf("month").isoWeekDay % 7, daysInMonth, weekendMask);
|
|
94
|
+
};
|
|
95
|
+
$Chronos.prototype.weekendsInMonth = function(wDef = 0, wLen = 2) {
|
|
96
|
+
const daysInMonth = this.daysInMonth();
|
|
97
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
98
|
+
return _countDays(this.startOf("month").isoWeekDay % 7, daysInMonth, weekendMask, 1, false);
|
|
99
|
+
};
|
|
100
|
+
$Chronos.prototype.workdaysInYear = function(wDef = 0, wLen = 2) {
|
|
101
|
+
const daysInYear = this.isLeapYear() ? 366 : 365;
|
|
102
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
103
|
+
return _countDays(this.startOf("year").isoWeekDay % 7, daysInYear, weekendMask);
|
|
104
|
+
};
|
|
105
|
+
$Chronos.prototype.weekendsInYear = function(wDef = 0, wLen = 2) {
|
|
106
|
+
const daysInYear = this.isLeapYear() ? 366 : 365;
|
|
107
|
+
const weekendMask = _buildWeekendMask(wDef, wLen);
|
|
108
|
+
return _countDays(this.startOf("year").isoWeekDay % 7, daysInYear, weekendMask, 1, false);
|
|
109
|
+
};
|
|
110
|
+
$Chronos.prototype.isBusinessHour = function(options) {
|
|
111
|
+
const _isBusinessHour = () => {
|
|
112
|
+
const { businessStartHour = 9, businessEndHour = 17 } = options ?? {};
|
|
113
|
+
if (businessStartHour === businessEndHour) return false;
|
|
114
|
+
const hour = $Date(this).getHours();
|
|
115
|
+
if (businessStartHour < businessEndHour) return hour >= businessStartHour && hour < businessEndHour;
|
|
116
|
+
else return hour >= businessStartHour || hour < businessEndHour;
|
|
117
|
+
};
|
|
118
|
+
if (options && "weekendDays" in options && !require_primitives.isUndefined(options?.weekendDays)) return this.isWorkday(options.weekendDays) && _isBusinessHour();
|
|
119
|
+
const { weekStartsOn = 0, weekendLength = 2 } = options ?? {};
|
|
120
|
+
return this.isWorkday(weekStartsOn, weekendLength) && _isBusinessHour();
|
|
121
|
+
};
|
|
122
|
+
$Chronos.prototype.toFiscalQuarter = function(startMonth = 7) {
|
|
123
|
+
const adjusted = (this.isoMonth - startMonth + 12) % 12;
|
|
124
|
+
return Math.floor(adjusted / 3) + 1;
|
|
125
|
+
};
|
|
126
|
+
$Chronos.prototype.toAcademicYear = function() {
|
|
127
|
+
const year = this.year;
|
|
128
|
+
if (this.month >= 6) return `${year}-${year + 1}`;
|
|
129
|
+
else return `${year - 1}-${year}`;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
exports.businessPlugin = businessPlugin;
|
|
@@ -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' {
|