@bbn/bbn 2.0.58 → 2.0.59
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 -3
- package/package.json +1 -1
|
@@ -513,6 +513,7 @@ export default function parse(input, format, cls = 'auto', locale) {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
if (matchedToken) {
|
|
516
|
+
debugger;
|
|
516
517
|
pattern += `(${matchedToken.regex})`;
|
|
517
518
|
if (matchedToken.apply) {
|
|
518
519
|
applyFns.push(value => matchedToken.apply(value, ctx));
|
|
@@ -591,15 +592,15 @@ export default function parse(input, format, cls = 'auto', locale) {
|
|
|
591
592
|
return new bbnDtDateTime(d);
|
|
592
593
|
}
|
|
593
594
|
if (isClsDate || isClsYearMonth || isClsMonthDay || (isClsAuto && hasDate && !hasTime)) {
|
|
594
|
-
if (isClsDate &&
|
|
595
|
+
if (isClsDate || (hasFullDate && isClsAuto)) {
|
|
595
596
|
const d = new T.PlainDate(ctx.year, ctx.month, ctx.day);
|
|
596
597
|
return new bbnDtDate(d);
|
|
597
598
|
}
|
|
598
|
-
if (isClsYearMonth &&
|
|
599
|
+
if (isClsYearMonth || (hasYearMonthOnly && isClsAuto)) {
|
|
599
600
|
const d = new T.PlainYearMonth(ctx.year, ctx.month);
|
|
600
601
|
return new bbnDtYearMonth(d);
|
|
601
602
|
}
|
|
602
|
-
if (isClsMonthDay &&
|
|
603
|
+
if (isClsMonthDay || (hasMonthDayOnly && isClsAuto)) {
|
|
603
604
|
const d = new T.PlainMonthDay(ctx.month, ctx.day, 1972);
|
|
604
605
|
return new bbnDtMonthDay(d);
|
|
605
606
|
}
|