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