@bbn/bbn 2.0.57 → 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 +5 -3
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ const lc = function (str, localeCode) {
|
|
|
16
16
|
export default function parse(input, format, cls = 'auto', locale) {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
18
18
|
bbn.fn.log([input, format, cls]);
|
|
19
|
+
debugger;
|
|
19
20
|
buildLocaleFromIntl();
|
|
20
21
|
const TemporalAny = globalThis.Temporal;
|
|
21
22
|
if (!TemporalAny) {
|
|
@@ -512,6 +513,7 @@ export default function parse(input, format, cls = 'auto', locale) {
|
|
|
512
513
|
}
|
|
513
514
|
}
|
|
514
515
|
if (matchedToken) {
|
|
516
|
+
debugger;
|
|
515
517
|
pattern += `(${matchedToken.regex})`;
|
|
516
518
|
if (matchedToken.apply) {
|
|
517
519
|
applyFns.push(value => matchedToken.apply(value, ctx));
|
|
@@ -590,15 +592,15 @@ export default function parse(input, format, cls = 'auto', locale) {
|
|
|
590
592
|
return new bbnDtDateTime(d);
|
|
591
593
|
}
|
|
592
594
|
if (isClsDate || isClsYearMonth || isClsMonthDay || (isClsAuto && hasDate && !hasTime)) {
|
|
593
|
-
if (isClsDate &&
|
|
595
|
+
if (isClsDate || (hasFullDate && isClsAuto)) {
|
|
594
596
|
const d = new T.PlainDate(ctx.year, ctx.month, ctx.day);
|
|
595
597
|
return new bbnDtDate(d);
|
|
596
598
|
}
|
|
597
|
-
if (isClsYearMonth &&
|
|
599
|
+
if (isClsYearMonth || (hasYearMonthOnly && isClsAuto)) {
|
|
598
600
|
const d = new T.PlainYearMonth(ctx.year, ctx.month);
|
|
599
601
|
return new bbnDtYearMonth(d);
|
|
600
602
|
}
|
|
601
|
-
if (isClsMonthDay &&
|
|
603
|
+
if (isClsMonthDay || (hasMonthDayOnly && isClsAuto)) {
|
|
602
604
|
const d = new T.PlainMonthDay(ctx.month, ctx.day, 1972);
|
|
603
605
|
return new bbnDtMonthDay(d);
|
|
604
606
|
}
|