nhb-toolbox 4.30.11 → 4.30.13
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to the package will be documented here.
|
|
6
6
|
|
|
7
|
+
## [4.30.13] - 2026-05-19
|
|
8
|
+
|
|
9
|
+
- **Fixed** *Chronos plugin method* `formatBangla()` to use `variant` from options properly to handle variant dependent calculations.
|
|
10
|
+
|
|
7
11
|
## [4.30.11] - 2026-05-17
|
|
8
12
|
|
|
9
13
|
- **Updated** the *time-zone* abbreviation matching logic of *Chronos plugin method* `getTimeZoneNameShort()` (alias: `getTimeZoneNameAbbr()`) and fixed the caching issue.
|
|
@@ -54,14 +54,15 @@ const banglaPlugin = ($Chronos) => {
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
$Chronos.prototype.formatBangla = function (fmt, opts) {
|
|
57
|
+
const { variant } = opts ?? {};
|
|
57
58
|
const { hour, minute, second, millisecond } = this;
|
|
58
59
|
const D_NAME = constants_1.BN_DAYS[this.weekDay];
|
|
59
|
-
const { monthIdx } = $bnDaysMonthIdx($Date(this),
|
|
60
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
60
61
|
const M_NAME = constants_1.BN_MONTHS[monthIdx];
|
|
61
|
-
const month = this.getBanglaMonth();
|
|
62
|
+
const month = this.getBanglaMonth({ variant });
|
|
62
63
|
const year = (0, helpers_1._padShunno)(this.getBanglaYear(), 4);
|
|
63
|
-
const date = this.getBanglaDay();
|
|
64
|
-
const seasonName = this.getBanglaSeasonName();
|
|
64
|
+
const date = this.getBanglaDay({ variant });
|
|
65
|
+
const seasonName = this.getBanglaSeasonName({ variant });
|
|
65
66
|
const offset = (0, convert_1.digitToBangla)(this.getTimeZoneOffset());
|
|
66
67
|
const dateComponents = {
|
|
67
68
|
YYYY: year,
|
|
@@ -51,14 +51,15 @@ export const banglaPlugin = ($Chronos) => {
|
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
$Chronos.prototype.formatBangla = function (fmt, opts) {
|
|
54
|
+
const { variant } = opts ?? {};
|
|
54
55
|
const { hour, minute, second, millisecond } = this;
|
|
55
56
|
const D_NAME = BN_DAYS[this.weekDay];
|
|
56
|
-
const { monthIdx } = $bnDaysMonthIdx($Date(this),
|
|
57
|
+
const { monthIdx } = $bnDaysMonthIdx($Date(this), variant);
|
|
57
58
|
const M_NAME = BN_MONTHS[monthIdx];
|
|
58
|
-
const month = this.getBanglaMonth();
|
|
59
|
+
const month = this.getBanglaMonth({ variant });
|
|
59
60
|
const year = _padShunno(this.getBanglaYear(), 4);
|
|
60
|
-
const date = this.getBanglaDay();
|
|
61
|
-
const seasonName = this.getBanglaSeasonName();
|
|
61
|
+
const date = this.getBanglaDay({ variant });
|
|
62
|
+
const seasonName = this.getBanglaSeasonName({ variant });
|
|
62
63
|
const offset = digitToBangla(this.getTimeZoneOffset());
|
|
63
64
|
const dateComponents = {
|
|
64
65
|
YYYY: year,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.30.
|
|
3
|
+
"version": "4.30.13",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/node": "^25.8.0",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
51
|
"jest": "^30.4.2",
|
|
52
|
-
"lint-staged": "^17.0.
|
|
52
|
+
"lint-staged": "^17.0.5",
|
|
53
53
|
"nhb-scripts": "^1.9.2",
|
|
54
54
|
"ts-jest": "^29.4.9",
|
|
55
55
|
"typescript": "^6.0.3"
|