@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.
@@ -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) => obj.with({
671
- hour: 0, minute: 0, second: 0,
672
- millisecond: 0, microsecond: 0, nanosecond: 0,
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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.74",
3
+ "version": "2.0.75",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",