@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.
@@ -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 && hasFullDate) {
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 && hasYearMonthOnly) {
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 && hasMonthDayOnly) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.58",
3
+ "version": "2.0.60",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",