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