@bbn/bbn 2.0.129 → 2.0.130
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/functions/parse.js +4 -4
- package/package.json +1 -1
|
@@ -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
|
}
|