@bbn/bbn 2.0.227 → 2.0.228

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.
@@ -403,7 +403,7 @@ export class bbnDt {
403
403
  if (!('year' in this.value)) {
404
404
  throw new Error('year() is not supported for this type');
405
405
  }
406
- if ((v !== undefined) && !(v instanceof Event) && (typeof v === 'number')) {
406
+ if ((v !== undefined) && !(v instanceof Event) && parseInt(v)) {
407
407
  const d = this.value.with({ year: v });
408
408
  return new this.constructor(d);
409
409
  }
@@ -416,7 +416,7 @@ export class bbnDt {
416
416
  if (!('month' in this.value)) {
417
417
  throw new Error('month() is not supported for this type');
418
418
  }
419
- if ((v !== undefined) && !(v instanceof Event) && (typeof v === 'number')) {
419
+ if ((v !== undefined) && !(v instanceof Event) && parseInt(v)) {
420
420
  const d = this.value.with({ month: v });
421
421
  return new this.constructor(d);
422
422
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.227",
3
+ "version": "2.0.228",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",