@bbn/bbn 2.0.74 → 2.0.75
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.js +11 -4
- package/package.json +1 -1
package/dist/dt/classes/dt.js
CHANGED
|
@@ -667,10 +667,17 @@ export class bbnDt {
|
|
|
667
667
|
throw new Error('Invalid unit for startOf: ' + unit);
|
|
668
668
|
}
|
|
669
669
|
let v = this.value;
|
|
670
|
-
const zeroTime = (obj) =>
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
670
|
+
const zeroTime = (obj) => {
|
|
671
|
+
const change = {};
|
|
672
|
+
if ('hour' in obj) {
|
|
673
|
+
Object.assign(change, {
|
|
674
|
+
hour: 0, minute: 0, second: 0,
|
|
675
|
+
millisecond: 0, microsecond: 0, nanosecond: 0,
|
|
676
|
+
});
|
|
677
|
+
return obj.with(change);
|
|
678
|
+
}
|
|
679
|
+
return obj;
|
|
680
|
+
};
|
|
674
681
|
switch (u) {
|
|
675
682
|
case 'y':
|
|
676
683
|
if (!('year' in v)) {
|