@bbn/bbn 2.0.70 → 2.0.71
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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/dt/classes/dt.d.ts +2 -1
- package/dist/dt/classes/dt.js +5 -6
- package/package.json +1 -1
package/dist/dt/classes/dt.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare abstract class bbnDt<TValue extends bbnDtTemporal> {
|
|
|
84
84
|
get WW(): string;
|
|
85
85
|
get W(): string;
|
|
86
86
|
format(format?: string): string;
|
|
87
|
-
getWeekday(mode?: string, locale?: string): string;
|
|
87
|
+
getWeekday(n: 0 | 1 | 2 | 3 | 4 | 5 | 6, mode?: string, locale?: string): string;
|
|
88
88
|
/**
|
|
89
89
|
* Returns a NEW date that is the next (or previous if past=true)
|
|
90
90
|
* occurrence of the given weekday, starting from this.#value.
|
|
@@ -101,5 +101,6 @@ export declare abstract class bbnDt<TValue extends bbnDtTemporal> {
|
|
|
101
101
|
fromDate(date: any, unit?: string): string;
|
|
102
102
|
startOf(unit?: string): bbnDt<any>;
|
|
103
103
|
endOf(unit?: string): bbnDt<any>;
|
|
104
|
+
clone(): bbnDt<any>;
|
|
104
105
|
}
|
|
105
106
|
export default bbnDt;
|
package/dist/dt/classes/dt.js
CHANGED
|
@@ -521,12 +521,8 @@ export class bbnDt {
|
|
|
521
521
|
}
|
|
522
522
|
return str;
|
|
523
523
|
}
|
|
524
|
-
getWeekday(mode = 'long', locale) {
|
|
525
|
-
|
|
526
|
-
if (typeof wd === 'number') {
|
|
527
|
-
return getWeekday(wd, mode, locale);
|
|
528
|
-
}
|
|
529
|
-
return undefined;
|
|
524
|
+
getWeekday(n, mode = 'long', locale) {
|
|
525
|
+
return getWeekday(n, mode, locale);
|
|
530
526
|
}
|
|
531
527
|
/**
|
|
532
528
|
* Returns a NEW date that is the next (or previous if past=true)
|
|
@@ -833,6 +829,9 @@ export class bbnDt {
|
|
|
833
829
|
throw new Error("Unsupported kind in endOf");
|
|
834
830
|
}
|
|
835
831
|
}
|
|
832
|
+
clone() {
|
|
833
|
+
return this.withValue(this.value);
|
|
834
|
+
}
|
|
836
835
|
}
|
|
837
836
|
_bbnDt_value = new WeakMap();
|
|
838
837
|
/** System time zone ID (e.g. "Europe/Rome") */
|