bn-calendar 1.2.6 → 1.2.10

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.
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
17
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/primitives-B-n6Y61s.mjs
18
18
  /**
19
19
  * Copyright 2026 - present Nazmul Hassan
20
20
  *
@@ -64,7 +64,7 @@ function isNonEmptyString(value) {
64
64
  }
65
65
 
66
66
  //#endregion
67
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
67
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
68
68
  /** * Bangla digits from `০-৯` mapped against `0-9` */
69
69
  const BN_DIGITS = /* @__PURE__ */ Object.freeze({
70
70
  "০": 0,
@@ -80,7 +80,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
80
80
  });
81
81
 
82
82
  //#endregion
83
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/specials-krf7zsqI.mjs
83
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/utilities-DH6-MgdV.mjs
84
84
  /**
85
85
  * Copyright 2026 - present Nazmul Hassan
86
86
  *
@@ -142,24 +142,6 @@ function isDateString(value) {
142
142
  function isNumericString(value) {
143
143
  return isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
144
144
  }
145
-
146
- //#endregion
147
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/utilities-CmPwOkdy.mjs
148
- /**
149
- * Copyright 2026 - present Nazmul Hassan
150
- *
151
- * Licensed under the Apache License, Version 2.0 (the "License");
152
- * you may not use this file except in compliance with the License.
153
- * You may obtain a copy of the License at
154
- *
155
- * http://www.apache.org/licenses/LICENSE-2.0
156
- *
157
- * Unless required by applicable law or agreed to in writing, software
158
- * distributed under the License is distributed on an "AS IS" BASIS,
159
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
160
- * See the License for the specific language governing permissions and
161
- * limitations under the License.
162
- */
163
145
  /**
164
146
  * * Normalize a number or numeric string to a number.
165
147
  * @description
@@ -173,7 +155,7 @@ function normalizeNumber(num) {
173
155
  }
174
156
 
175
157
  //#endregion
176
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.mjs
158
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index.mjs
177
159
  /**
178
160
  * Copyright 2026 - present Nazmul Hassan
179
161
  *
@@ -252,4 +234,4 @@ function digitToBangla(digit, preserveNonDigit = true) {
252
234
  }
253
235
 
254
236
  //#endregion
255
- export { isObjectWithKeys as a, isNumber as c, isDateString as i, digitToBangla as n, isInteger as o, normalizeNumber as r, isNonEmptyString as s, banglaToDigit as t };
237
+ export { normalizeNumber as a, isNumber as c, isObjectWithKeys as i, digitToBangla as n, isInteger as o, isDateString as r, isNonEmptyString as s, banglaToDigit as t };
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
 
18
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/primitives-Djsevc69.mjs
18
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/primitives-B-n6Y61s.mjs
19
19
  /**
20
20
  * Copyright 2026 - present Nazmul Hassan
21
21
  *
@@ -65,7 +65,7 @@ function isNonEmptyString(value) {
65
65
  }
66
66
 
67
67
  //#endregion
68
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
68
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/constants-ZyfpysiQ.mjs
69
69
  /** * Bangla digits from `০-৯` mapped against `0-9` */
70
70
  const BN_DIGITS = /* @__PURE__ */ Object.freeze({
71
71
  "০": 0,
@@ -81,7 +81,7 @@ const BN_DIGITS = /* @__PURE__ */ Object.freeze({
81
81
  });
82
82
 
83
83
  //#endregion
84
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/specials-krf7zsqI.mjs
84
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/utilities-DH6-MgdV.mjs
85
85
  /**
86
86
  * Copyright 2026 - present Nazmul Hassan
87
87
  *
@@ -143,24 +143,6 @@ function isDateString(value) {
143
143
  function isNumericString(value) {
144
144
  return isString(value) && value?.trim() !== "" && Number.isFinite(Number(value));
145
145
  }
146
-
147
- //#endregion
148
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/utilities-CmPwOkdy.mjs
149
- /**
150
- * Copyright 2026 - present Nazmul Hassan
151
- *
152
- * Licensed under the Apache License, Version 2.0 (the "License");
153
- * you may not use this file except in compliance with the License.
154
- * You may obtain a copy of the License at
155
- *
156
- * http://www.apache.org/licenses/LICENSE-2.0
157
- *
158
- * Unless required by applicable law or agreed to in writing, software
159
- * distributed under the License is distributed on an "AS IS" BASIS,
160
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
161
- * See the License for the specific language governing permissions and
162
- * limitations under the License.
163
- */
164
146
  /**
165
147
  * * Normalize a number or numeric string to a number.
166
148
  * @description
@@ -174,7 +156,7 @@ function normalizeNumber(num) {
174
156
  }
175
157
 
176
158
  //#endregion
177
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/index.mjs
159
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index.mjs
178
160
  /**
179
161
  * Copyright 2026 - present Nazmul Hassan
180
162
  *
@@ -14,43 +14,24 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/object-DyVg8BFt.d.mts
17
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index-RyvzOKVa.d.mts
18
18
  declare const YEAR_FORMATS: readonly ["YYYY", "YY", "yyyy", "yy"];
19
19
  declare const MONTH_FORMATS: readonly ["M", "MM", "mmm", "mmmm"];
20
20
  declare const DATE_FORMATS: readonly ["DD", "D", "Do"];
21
21
  declare const DAY_FORMATS: readonly ["d", "dd", "ddd"];
22
22
  /** * Bangla digits from `০-৯` mapped against `0-9` */
23
23
  declare const BN_DIGITS: Readonly<{
24
- readonly '\u09E6': 0;
25
- readonly '\u09E7': 1;
26
- readonly '\u09E8': 2;
27
- readonly '\u09E9': 3;
28
- readonly '\u09EA': 4;
29
- readonly '\u09EB': 5;
30
- readonly '\u09EC': 6;
31
- readonly '\u09ED': 7;
32
- readonly '\u09EE': 8;
33
- readonly '\u09EF': 9;
34
- }>; //#endregion
35
- //#region src/number/Unit.d.ts
36
- /**
37
- * @class Class to handle conversions between various types of units.
38
- *
39
- * Includes static methods for:
40
- * - Length: meters, feet, kilometers, miles
41
- * - Mass: kilograms, pounds, grams, ounces
42
- * - Temperature: Celsius, Fahrenheit, Kelvin
43
- * - Volume: liters, gallons
44
- * - Area: square meters, square feet
45
- * - Speed: km/h, mph
46
- * - Time: hours, minutes, seconds, days
47
- * - Digital Storage: kilobytes, megabytes, gigabytes
48
- * - Energy: joules, calories
49
- * - Pressure: atm, pascals
50
- * - Frequency: Hz, kHz
51
- *
52
- * @remarks For more robust unit conversion, please use the `Converter` function which provides category-specific conversion classes.
53
- */
24
+ readonly '': 0;
25
+ readonly '': 1;
26
+ readonly '': 2;
27
+ readonly '': 3;
28
+ readonly '': 4;
29
+ readonly '': 5;
30
+ readonly '': 6;
31
+ readonly '': 7;
32
+ readonly '': 8;
33
+ readonly '': 9;
34
+ }>;
54
35
  /**
55
36
  * * Broadens a literal union (typically `string` or `number`) to also accept any other value of the base type, without losing IntelliSense autocomplete for the provided literals.
56
37
  *
@@ -76,20 +57,11 @@ declare const BN_DIGITS: Readonly<{
76
57
  *
77
58
  * @note Technically, this uses intersection with primitive base types (`string & {}` or `number & {}`) to retain IntelliSense while avoiding type narrowing.
78
59
  */
79
- type LooseLiteral<T extends string | number> = T | (T extends string ? string & {} : number & {});
80
- /**
81
- * * Extracts an object type containing only the optional keys from `T`.
82
- *
83
- * @typeParam T - The original object type
84
- * @returns A new object type with only optional keys from `T`
85
- * @example
86
- * type Example = { a: string; b?: number; c?: boolean };
87
- * type OptionalPart = ExtractOptional<Example>;
88
- * // { b?: number; c?: boolean }
89
- */
60
+ type LooseLiteral<T> = T | $LooseLiteral<T>;
61
+ /** Helper type to create loose `string`/`number` part of {@link LooseLiteral} */
62
+ type $LooseLiteral<T> = T extends string ? string & {} : T extends number ? number & {} : never;
90
63
  /** * Build a tuple of given length (helper for type-level arithmetic). */
91
64
  type $BuildTuple<L extends number, T extends unknown[] = []> = T['length'] extends L ? T : $BuildTuple<L, [...T, unknown]>;
92
- /** * Produce a union of numbers `From | From+1 | ... | To`. */
93
65
  /**
94
66
  * Recursively join the string S for each element in the tuple A.
95
67
  * Returns an empty string for an empty tuple.
@@ -108,21 +80,6 @@ type $JoinRepeat<S extends string, A extends unknown[]> = A extends [unknown, ..
108
80
  * - If `S` is a union (e.g. 'a' | 'b'), the resulting union grows exponentially with `N`.
109
81
  */
110
82
  type Repeat<S extends string, N extends number> = $JoinRepeat<S, $BuildTuple<N>>;
111
- /**
112
- * * Replace all occurrences of substring `Search` in `Str` with `With`.
113
- *
114
- * @example
115
- * type Dash = Replace<'hello world', ' ', '-'>; // "hello-world"
116
- *
117
- * type Underscore = Replace<'a-b-c', '-', '_'>; // "a_b_c"
118
- *
119
- * type NoSpaces = Replace<' spaced out ', ' ', ''>; // "spacedout"
120
- *
121
- * @remarks **Notes:**
122
- * - Works recursively to replace **all** occurrences of `Search`.
123
- * - If `Search` does not exist in `Str`, returns `Str` unchanged.
124
- * - `Str`, `Search` (Default is space `" "`) and `With` (Default is `"-"`) must be literal string types.
125
- */
126
83
  //#endregion
127
84
  //#region src/types/number.d.ts
128
85
  /** Enumerate & Enumerate Internal: builds a union of all numbers from 0 to N - 1 */
@@ -157,15 +114,12 @@ type $AddOne<N extends number, Acc extends unknown[] = []> = Acc['length'] exten
157
114
  * @returns A union of numeric literal types from `From` to `To - 1`.
158
115
  */
159
116
  type NumberRange<From extends number, To extends number> = Exclude<Enumerate<$AddOne<To>>, Enumerate<From>>;
160
- /** - Number value in percentage `(0% - 100%)` without `%` symbol. */
161
117
  /** Bangla digits from `০-৯` */
162
118
  type BanglaDigit = keyof typeof BN_DIGITS;
163
119
  /** Bangla digits from `১-৯` */
164
120
  type $BnOnes = Exclude<BanglaDigit, '০'>;
165
121
  /** Result type for Bangla digit conversion based on `force` flag */
166
- type BnDigitResult<Force extends boolean> = Force extends true ? number : string; //#endregion
167
- //#region src/types/date.d.ts
168
- /** - Minute in numeric string from `00` to `23` */
122
+ type BnDigitResult<Force extends boolean> = Force extends true ? number : string;
169
123
  /** Year in either 4 or 2 digits format */
170
124
  type YearToken = (typeof YEAR_FORMATS)[number];
171
125
  /** Month in either 1 or 2 digits or 3 letters or full word format */
@@ -174,9 +128,7 @@ type MonthToken = (typeof MONTH_FORMATS)[number];
174
128
  type DayToken = (typeof DAY_FORMATS)[number];
175
129
  /** Date in either 1 or 2 digits format */
176
130
  type DateToken = (typeof DATE_FORMATS)[number];
177
- /** Second in either 1 or 2 digits format */
178
131
  /** Standard date formats. */
179
132
  type DateFormatToken = `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}, ${YearToken}` | `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}, ${YearToken}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken} ${YearToken}` | `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>} ${YearToken}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}, ${YearToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}, ${YearToken}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken} ${YearToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>} ${YearToken}` | `${Exclude<DateToken, 'Do'>}.${Exclude<MonthToken, 'mmm' | 'mmmm'>}.${YearToken}` | `${YearToken}.${Exclude<MonthToken, 'mmm' | 'mmmm'>}.${Exclude<DateToken, 'Do'>}` | `${Exclude<DateToken, 'Do'>}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${YearToken}` | `${Exclude<DateToken, 'Do'>}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${YearToken}` | `${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${Exclude<DateToken, 'Do'>}/${YearToken}` | `${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${Exclude<DateToken, 'Do'>}-${YearToken}` | `${YearToken}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${Exclude<DateToken, 'Do'>}` | `${YearToken}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${Exclude<DateToken, 'Do'>}` | `${YearToken}-${Exclude<DateToken, 'Do'>}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}` | `${YearToken}/${Exclude<DateToken, 'Do'>}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}`;
180
- /** Standard Time Formats */
181
133
  //#endregion
182
134
  export { Enumerate as a, Repeat as c, DateFormatToken as i, BanglaDigit as n, LooseLiteral as o, BnDigitResult as r, NumberRange as s, $BnOnes as t };
@@ -14,43 +14,24 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/object-DyVg8BFt.d.mts
17
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index-RyvzOKVa.d.mts
18
18
  declare const YEAR_FORMATS: readonly ["YYYY", "YY", "yyyy", "yy"];
19
19
  declare const MONTH_FORMATS: readonly ["M", "MM", "mmm", "mmmm"];
20
20
  declare const DATE_FORMATS: readonly ["DD", "D", "Do"];
21
21
  declare const DAY_FORMATS: readonly ["d", "dd", "ddd"];
22
22
  /** * Bangla digits from `০-৯` mapped against `0-9` */
23
23
  declare const BN_DIGITS: Readonly<{
24
- readonly '\u09E6': 0;
25
- readonly '\u09E7': 1;
26
- readonly '\u09E8': 2;
27
- readonly '\u09E9': 3;
28
- readonly '\u09EA': 4;
29
- readonly '\u09EB': 5;
30
- readonly '\u09EC': 6;
31
- readonly '\u09ED': 7;
32
- readonly '\u09EE': 8;
33
- readonly '\u09EF': 9;
34
- }>; //#endregion
35
- //#region src/number/Unit.d.ts
36
- /**
37
- * @class Class to handle conversions between various types of units.
38
- *
39
- * Includes static methods for:
40
- * - Length: meters, feet, kilometers, miles
41
- * - Mass: kilograms, pounds, grams, ounces
42
- * - Temperature: Celsius, Fahrenheit, Kelvin
43
- * - Volume: liters, gallons
44
- * - Area: square meters, square feet
45
- * - Speed: km/h, mph
46
- * - Time: hours, minutes, seconds, days
47
- * - Digital Storage: kilobytes, megabytes, gigabytes
48
- * - Energy: joules, calories
49
- * - Pressure: atm, pascals
50
- * - Frequency: Hz, kHz
51
- *
52
- * @remarks For more robust unit conversion, please use the `Converter` function which provides category-specific conversion classes.
53
- */
24
+ readonly '': 0;
25
+ readonly '': 1;
26
+ readonly '': 2;
27
+ readonly '': 3;
28
+ readonly '': 4;
29
+ readonly '': 5;
30
+ readonly '': 6;
31
+ readonly '': 7;
32
+ readonly '': 8;
33
+ readonly '': 9;
34
+ }>;
54
35
  /**
55
36
  * * Broadens a literal union (typically `string` or `number`) to also accept any other value of the base type, without losing IntelliSense autocomplete for the provided literals.
56
37
  *
@@ -76,20 +57,11 @@ declare const BN_DIGITS: Readonly<{
76
57
  *
77
58
  * @note Technically, this uses intersection with primitive base types (`string & {}` or `number & {}`) to retain IntelliSense while avoiding type narrowing.
78
59
  */
79
- type LooseLiteral<T extends string | number> = T | (T extends string ? string & {} : number & {});
80
- /**
81
- * * Extracts an object type containing only the optional keys from `T`.
82
- *
83
- * @typeParam T - The original object type
84
- * @returns A new object type with only optional keys from `T`
85
- * @example
86
- * type Example = { a: string; b?: number; c?: boolean };
87
- * type OptionalPart = ExtractOptional<Example>;
88
- * // { b?: number; c?: boolean }
89
- */
60
+ type LooseLiteral<T> = T | $LooseLiteral<T>;
61
+ /** Helper type to create loose `string`/`number` part of {@link LooseLiteral} */
62
+ type $LooseLiteral<T> = T extends string ? string & {} : T extends number ? number & {} : never;
90
63
  /** * Build a tuple of given length (helper for type-level arithmetic). */
91
64
  type $BuildTuple<L extends number, T extends unknown[] = []> = T['length'] extends L ? T : $BuildTuple<L, [...T, unknown]>;
92
- /** * Produce a union of numbers `From | From+1 | ... | To`. */
93
65
  /**
94
66
  * Recursively join the string S for each element in the tuple A.
95
67
  * Returns an empty string for an empty tuple.
@@ -108,21 +80,6 @@ type $JoinRepeat<S extends string, A extends unknown[]> = A extends [unknown, ..
108
80
  * - If `S` is a union (e.g. 'a' | 'b'), the resulting union grows exponentially with `N`.
109
81
  */
110
82
  type Repeat<S extends string, N extends number> = $JoinRepeat<S, $BuildTuple<N>>;
111
- /**
112
- * * Replace all occurrences of substring `Search` in `Str` with `With`.
113
- *
114
- * @example
115
- * type Dash = Replace<'hello world', ' ', '-'>; // "hello-world"
116
- *
117
- * type Underscore = Replace<'a-b-c', '-', '_'>; // "a_b_c"
118
- *
119
- * type NoSpaces = Replace<' spaced out ', ' ', ''>; // "spacedout"
120
- *
121
- * @remarks **Notes:**
122
- * - Works recursively to replace **all** occurrences of `Search`.
123
- * - If `Search` does not exist in `Str`, returns `Str` unchanged.
124
- * - `Str`, `Search` (Default is space `" "`) and `With` (Default is `"-"`) must be literal string types.
125
- */
126
83
  //#endregion
127
84
  //#region src/types/number.d.ts
128
85
  /** Enumerate & Enumerate Internal: builds a union of all numbers from 0 to N - 1 */
@@ -157,15 +114,12 @@ type $AddOne<N extends number, Acc extends unknown[] = []> = Acc['length'] exten
157
114
  * @returns A union of numeric literal types from `From` to `To - 1`.
158
115
  */
159
116
  type NumberRange<From extends number, To extends number> = Exclude<Enumerate<$AddOne<To>>, Enumerate<From>>;
160
- /** - Number value in percentage `(0% - 100%)` without `%` symbol. */
161
117
  /** Bangla digits from `০-৯` */
162
118
  type BanglaDigit = keyof typeof BN_DIGITS;
163
119
  /** Bangla digits from `১-৯` */
164
120
  type $BnOnes = Exclude<BanglaDigit, '০'>;
165
121
  /** Result type for Bangla digit conversion based on `force` flag */
166
- type BnDigitResult<Force extends boolean> = Force extends true ? number : string; //#endregion
167
- //#region src/types/date.d.ts
168
- /** - Minute in numeric string from `00` to `23` */
122
+ type BnDigitResult<Force extends boolean> = Force extends true ? number : string;
169
123
  /** Year in either 4 or 2 digits format */
170
124
  type YearToken = (typeof YEAR_FORMATS)[number];
171
125
  /** Month in either 1 or 2 digits or 3 letters or full word format */
@@ -174,9 +128,7 @@ type MonthToken = (typeof MONTH_FORMATS)[number];
174
128
  type DayToken = (typeof DAY_FORMATS)[number];
175
129
  /** Date in either 1 or 2 digits format */
176
130
  type DateToken = (typeof DATE_FORMATS)[number];
177
- /** Second in either 1 or 2 digits format */
178
131
  /** Standard date formats. */
179
132
  type DateFormatToken = `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}, ${YearToken}` | `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}, ${YearToken}` | `${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken} ${YearToken}` | `${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>} ${YearToken}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken}, ${YearToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>}, ${YearToken}` | `${DayToken}, ${Exclude<MonthToken, 'M' | 'MM'>} ${DateToken} ${YearToken}` | `${DayToken}, ${DateToken} ${Exclude<MonthToken, 'M' | 'MM'>} ${YearToken}` | `${Exclude<DateToken, 'Do'>}.${Exclude<MonthToken, 'mmm' | 'mmmm'>}.${YearToken}` | `${YearToken}.${Exclude<MonthToken, 'mmm' | 'mmmm'>}.${Exclude<DateToken, 'Do'>}` | `${Exclude<DateToken, 'Do'>}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${YearToken}` | `${Exclude<DateToken, 'Do'>}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${YearToken}` | `${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${Exclude<DateToken, 'Do'>}/${YearToken}` | `${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${Exclude<DateToken, 'Do'>}-${YearToken}` | `${YearToken}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}-${Exclude<DateToken, 'Do'>}` | `${YearToken}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}/${Exclude<DateToken, 'Do'>}` | `${YearToken}-${Exclude<DateToken, 'Do'>}-${Exclude<MonthToken, 'mmm' | 'mmmm'>}` | `${YearToken}/${Exclude<DateToken, 'Do'>}/${Exclude<MonthToken, 'mmm' | 'mmmm'>}`;
180
- /** Standard Time Formats */
181
133
  //#endregion
182
134
  export { Enumerate as a, Repeat as c, DateFormatToken as i, BanglaDigit as n, LooseLiteral as o, BnDigitResult as r, NumberRange as s, $BnOnes as t };
package/dist/index.cjs CHANGED
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
- const require_dist = require('./dist-2u-Hm2TM.cjs');
18
+ const require_dist = require('./dist-DUk8hJtq.cjs');
19
19
 
20
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/guards-DBunDnng.mjs
20
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/guards-CV5StNcy.mjs
21
21
  /**
22
22
  * * Checks if the year is a leap year.
23
23
  *
@@ -279,7 +279,7 @@ const SORTED_TIME_FORMATS = /* @__PURE__ */ Object.freeze([
279
279
 
280
280
  //#endregion
281
281
  //#region src/helpers.ts
282
- /** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
282
+ /** Core formatting logic shared by `BanglaCalendar` and possible future implementation */
283
283
  function _formatDateCore(format, dateComponents) {
284
284
  const tokenRegex = new RegExp(`^(${SORTED_TIME_FORMATS.join("|")})`);
285
285
  let result = "";
@@ -939,7 +939,7 @@ var BanglaCalendar = class BanglaCalendar {
939
939
  DD: _padShunno(date.bn),
940
940
  Do: date.bn,
941
941
  S: seasonName,
942
- SS: seasonName + "কাল"
942
+ SS: `${seasonName}কাল`
943
943
  };
944
944
  return _formatDateCore(format || "ddd, DD mmmm (SS), YYYY বঙ্গাব্দ", dateComponents);
945
945
  }
@@ -975,7 +975,8 @@ var BanglaCalendar = class BanglaCalendar {
975
975
  #getClampedBnCal(tyBn, tmBn, cdBn, variant) {
976
976
  const { gregYear } = this.#processGregYear(tyBn, tmBn);
977
977
  const { bnMonthTable } = this.#getBnMonthTableLeap(gregYear, tyBn);
978
- return new BanglaCalendar(tyBn, tmBn, Math.min(cdBn, bnMonthTable[tmBn - 1]), { variant });
978
+ const tdBn = Math.min(cdBn, bnMonthTable[tmBn - 1]);
979
+ return new BanglaCalendar(tyBn, tmBn, tdBn, { variant });
979
980
  }
980
981
  /** Process variant from the config */
981
982
  #processVariants(v1, v2, v3, v4) {
package/dist/index.d.cts CHANGED
@@ -14,9 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as Enumerate, s as NumberRange } from "./object-DyVg8BFt-DFzPgPEP.cjs";
18
- import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-BhqpTl07.cjs";
19
-
17
+ import { a as Enumerate, s as NumberRange } from "./index-RyvzOKVa-BA85h5wj.cjs";
18
+ import { a as $BnEn, c as BanglaDate, d as BanglaMonth, f as BanglaMonthName, g as BnCalendarVariant, h as BnCalendarConfig, l as BanglaDateFormat, m as BanglaYear, p as BanglaSeasonName, u as BanglaDayName } from "./types-CaovKlY-.cjs";
20
19
  //#region src/BanglaCalendar.d.ts
21
20
  /**
22
21
  * @class Represents a date in the Bangla calendar system with support for different variants.
@@ -53,23 +52,32 @@ declare class BanglaCalendar {
53
52
  readonly variant: BnCalendarVariant;
54
53
  /** Bangla year */
55
54
  readonly year: Readonly<{
56
- /** Bangla year in Bangla digit */bn: BanglaYear; /** Bangla year in Latin digit */
55
+ /** Bangla year in Bangla digit */
56
+ bn: BanglaYear;
57
+ /** Bangla year in Latin digit */
57
58
  en: number;
58
59
  }>;
59
60
  /** Bangla month */
60
61
  readonly month: Readonly<{
61
- /** Bangla month in Bangla digit */bn: BanglaMonth; /** Bangla month in Latin digit */
62
+ /** Bangla month in Bangla digit */
63
+ bn: BanglaMonth;
64
+ /** Bangla month in Latin digit */
62
65
  en: NumberRange<1, 12>;
63
66
  }>;
64
67
  /** Bangla day of the month */
65
68
  readonly date: Readonly<{
66
- /** Bangla day of the month in Bangla digit */bn: BanglaDate; /** Bangla day of the month in Latin digit */
69
+ /** Bangla day of the month in Bangla digit */
70
+ bn: BanglaDate;
71
+ /** Bangla day of the month in Latin digit */
67
72
  en: NumberRange<1, 31>;
68
73
  }>;
69
74
  /** Gregorian equivalent of the current bangla date */
70
75
  readonly gregorian: Readonly<{
71
- /** Gregorian year in Latin digit */year: number; /** Gregorian month in Latin digit (`1-12`) */
72
- month: NumberRange<1, 12>; /** Gregorian day of the month in Latin digit (`1-31`) */
76
+ /** Gregorian year in Latin digit */
77
+ year: number;
78
+ /** Gregorian month in Latin digit (`1-12`) */
79
+ month: NumberRange<1, 12>;
80
+ /** Gregorian day of the month in Latin digit (`1-31`) */
73
81
  date: NumberRange<1, 31>;
74
82
  }>;
75
83
  /** Gets the day of the week (0-6, where 0 is Sunday (রবিবার)). */
package/dist/index.d.mts CHANGED
@@ -14,9 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as Enumerate, s as NumberRange } from "./object-DyVg8BFt-DFzPgPEP.mjs";
18
- import { _ as BnCalendarConfig, a as $BnEn, c as BanglaDate, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, l as BanglaDateFormat, m as BanglaMonthName, p as BanglaMonth, v as BnCalendarVariant } from "./types-CuBrWmN0.mjs";
19
-
17
+ import { a as Enumerate, s as NumberRange } from "./index-RyvzOKVa-BA85h5wj.mjs";
18
+ import { a as $BnEn, c as BanglaDate, d as BanglaMonth, f as BanglaMonthName, g as BnCalendarVariant, h as BnCalendarConfig, l as BanglaDateFormat, m as BanglaYear, p as BanglaSeasonName, u as BanglaDayName } from "./types-HdT16D_P.mjs";
20
19
  //#region src/BanglaCalendar.d.ts
21
20
  /**
22
21
  * @class Represents a date in the Bangla calendar system with support for different variants.
@@ -53,23 +52,32 @@ declare class BanglaCalendar {
53
52
  readonly variant: BnCalendarVariant;
54
53
  /** Bangla year */
55
54
  readonly year: Readonly<{
56
- /** Bangla year in Bangla digit */bn: BanglaYear; /** Bangla year in Latin digit */
55
+ /** Bangla year in Bangla digit */
56
+ bn: BanglaYear;
57
+ /** Bangla year in Latin digit */
57
58
  en: number;
58
59
  }>;
59
60
  /** Bangla month */
60
61
  readonly month: Readonly<{
61
- /** Bangla month in Bangla digit */bn: BanglaMonth; /** Bangla month in Latin digit */
62
+ /** Bangla month in Bangla digit */
63
+ bn: BanglaMonth;
64
+ /** Bangla month in Latin digit */
62
65
  en: NumberRange<1, 12>;
63
66
  }>;
64
67
  /** Bangla day of the month */
65
68
  readonly date: Readonly<{
66
- /** Bangla day of the month in Bangla digit */bn: BanglaDate; /** Bangla day of the month in Latin digit */
69
+ /** Bangla day of the month in Bangla digit */
70
+ bn: BanglaDate;
71
+ /** Bangla day of the month in Latin digit */
67
72
  en: NumberRange<1, 31>;
68
73
  }>;
69
74
  /** Gregorian equivalent of the current bangla date */
70
75
  readonly gregorian: Readonly<{
71
- /** Gregorian year in Latin digit */year: number; /** Gregorian month in Latin digit (`1-12`) */
72
- month: NumberRange<1, 12>; /** Gregorian day of the month in Latin digit (`1-31`) */
76
+ /** Gregorian year in Latin digit */
77
+ year: number;
78
+ /** Gregorian month in Latin digit (`1-12`) */
79
+ month: NumberRange<1, 12>;
80
+ /** Gregorian day of the month in Latin digit (`1-31`) */
73
81
  date: NumberRange<1, 31>;
74
82
  }>;
75
83
  /** Gets the day of the week (0-6, where 0 is Sunday (রবিবার)). */
package/dist/index.mjs CHANGED
@@ -14,9 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as isObjectWithKeys, c as isNumber, i as isDateString, n as digitToBangla, o as isInteger, r as normalizeNumber, s as isNonEmptyString, t as banglaToDigit } from "./dist-CL82Iohb.mjs";
17
+ import { a as normalizeNumber, c as isNumber, i as isObjectWithKeys, n as digitToBangla, o as isInteger, r as isDateString, s as isNonEmptyString, t as banglaToDigit } from "./dist-C5OaVGq-.mjs";
18
18
 
19
- //#region node_modules/.pnpm/toolbox-x@2.4.2/node_modules/toolbox-x/dist/guards-DBunDnng.mjs
19
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/guards-CV5StNcy.mjs
20
20
  /**
21
21
  * * Checks if the year is a leap year.
22
22
  *
@@ -278,7 +278,7 @@ const SORTED_TIME_FORMATS = /* @__PURE__ */ Object.freeze([
278
278
 
279
279
  //#endregion
280
280
  //#region src/helpers.ts
281
- /** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
281
+ /** Core formatting logic shared by `BanglaCalendar` and possible future implementation */
282
282
  function _formatDateCore(format, dateComponents) {
283
283
  const tokenRegex = new RegExp(`^(${SORTED_TIME_FORMATS.join("|")})`);
284
284
  let result = "";
@@ -938,7 +938,7 @@ var BanglaCalendar = class BanglaCalendar {
938
938
  DD: _padShunno(date.bn),
939
939
  Do: date.bn,
940
940
  S: seasonName,
941
- SS: seasonName + "কাল"
941
+ SS: `${seasonName}কাল`
942
942
  };
943
943
  return _formatDateCore(format || "ddd, DD mmmm (SS), YYYY বঙ্গাব্দ", dateComponents);
944
944
  }
@@ -974,7 +974,8 @@ var BanglaCalendar = class BanglaCalendar {
974
974
  #getClampedBnCal(tyBn, tmBn, cdBn, variant) {
975
975
  const { gregYear } = this.#processGregYear(tyBn, tmBn);
976
976
  const { bnMonthTable } = this.#getBnMonthTableLeap(gregYear, tyBn);
977
- return new BanglaCalendar(tyBn, tmBn, Math.min(cdBn, bnMonthTable[tmBn - 1]), { variant });
977
+ const tdBn = Math.min(cdBn, bnMonthTable[tmBn - 1]);
978
+ return new BanglaCalendar(tyBn, tmBn, tdBn, { variant });
978
979
  }
979
980
  /** Process variant from the config */
980
981
  #processVariants(v1, v2, v3, v4) {
@@ -14,8 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-DyVg8BFt-DFzPgPEP.cjs";
18
-
17
+ import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./index-RyvzOKVa-BA85h5wj.cjs";
19
18
  //#region src/constants.d.ts
20
19
  /** Bangla month days table for different variants */
21
20
  declare const BN_MONTH_TABLES: Readonly<{
@@ -186,16 +185,6 @@ type $BanglaYear<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? number : B
186
185
  type $BanglaMonth<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 12> : BanglaMonth;
187
186
  /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
188
187
  type $BanglaMonthDate<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 31> : BanglaDate;
189
- /** Represents a Bangla date object for `Chronos` plugin */
190
- type BanglaDateObject<Locale extends $BnEn = 'bn'> = {
191
- /** Represents Bangla year either in Bangla digit or Latin from 1-12 */year: $BanglaYear<Locale>; /** Represents Bangla month either in Bangla digit or Latin from 1-12 */
192
- month: $BanglaMonth<Locale>; /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
193
- date: $BanglaMonthDate<Locale>; /** Bangla name of the weekday either in Bangla or Latin */
194
- dayName: BanglaDayName<Locale>; /** Bangla name of the month either in Bangla or Latin */
195
- monthName: BanglaMonthName<Locale>; /** Bangla name of the season either in Bangla or Latin */
196
- seasonName: BanglaSeasonName<Locale>; /** Leap year status of the current year */
197
- isLeapYear: boolean;
198
- };
199
188
  /** Variant of Bangla calendar system */
200
189
  type BnCalendarVariant = keyof typeof BN_MONTH_TABLES;
201
190
  /** Configuration object for Bangla Calendar system */
@@ -203,10 +192,5 @@ interface BnCalendarConfig {
203
192
  /** - Calendar variant to use. Defaults to `'revised-2019'`. */
204
193
  variant?: BnCalendarVariant;
205
194
  }
206
- /** Bangla date options for `Chronos` plugin (`banglaPlugin`) */
207
- interface BanglaDateOptions<Locale extends $BnEn> extends BnCalendarConfig {
208
- /** - Locale to use for output values. Defaults to `'bn'`. */
209
- locale?: Locale | $BnEn;
210
- }
211
195
  //#endregion
212
- export { MSToken as C, TimeToken as D, SecondToken as E, YearToken as O, HourToken as S, MonthToken as T, BnCalendarConfig as _, $BnEn as a, DateWithSeasonToken as b, BanglaDate as c, BanglaDateOptions as d, BanglaDayName as f, BanglaYear as g, BanglaSeasonName as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaMonthName as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaMonth as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDateObject as u, BnCalendarVariant as v, MinuteToken as w, DayToken as x, DateToken as y };
196
+ export { MonthToken as C, YearToken as E, MinuteToken as S, TimeToken as T, DateToken as _, $BnEn as a, HourToken as b, BanglaDate as c, BanglaMonth as d, BanglaMonthName as f, BnCalendarVariant as g, BnCalendarConfig as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaYear as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaSeasonName as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDayName as u, DateWithSeasonToken as v, SecondToken as w, MSToken as x, DayToken as y };