@bbn/bbn 2.0.129 → 2.0.131

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.
@@ -625,6 +625,10 @@ export default function parse(input, format, cls = 'auto', force, locale) {
625
625
  const d = new T.PlainMonthDay(ctx.month, ctx.day, 1972);
626
626
  dtObj = new bbnDtMonthDay(d);
627
627
  }
628
+ else if (isClsAuto && ctx.hasYear) {
629
+ const d = new T.PlainDate(ctx.year, 1, 1);
630
+ dtObj = new bbnDtDate(d);
631
+ }
628
632
  else {
629
633
  throw new Error('Not enough date components for a known Temporal type');
630
634
  }
@@ -633,10 +637,6 @@ export default function parse(input, format, cls = 'auto', force, locale) {
633
637
  const d = new T.PlainTime(ctx.hour, ctx.minute, ctx.second, ctx.ms * 1000000);
634
638
  dtObj = new bbnDtTime(d);
635
639
  }
636
- else if (isClsAuto && !hasDate && !hasTime && ctx.hasYear) {
637
- const d = new T.PlainDate(ctx.year, 1, 1);
638
- dtObj = new bbnDtDate(d);
639
- }
640
640
  else {
641
641
  throw new Error('No date or time information found in input');
642
642
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.129",
3
+ "version": "2.0.131",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",