@bbn/bbn 2.0.123 → 2.0.125

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.
@@ -5,6 +5,7 @@ import bbnDtDate from '../classes/date.js';
5
5
  import bbnDtTime from '../classes/time.js';
6
6
  import bbnDtYearMonth from '../classes/yearMonth.js';
7
7
  import bbnDtMonthDay from '../classes/monthDay.js';
8
+ import log from '../../fn/browser/log.js';
8
9
  const lc = function (str, localeCode) {
9
10
  try {
10
11
  return localeCode ? str.toLocaleLowerCase(localeCode) : str.toLowerCase();
@@ -526,6 +527,7 @@ export default function parse(input, format, cls = 'auto', force, locale) {
526
527
  if (matchedToken) {
527
528
  pattern += `(${matchedToken.regex})`;
528
529
  if (matchedToken.apply) {
530
+ log(matchedToken);
529
531
  applyFns.push(value => matchedToken.apply(value, ctx));
530
532
  }
531
533
  else {
@@ -539,10 +541,6 @@ export default function parse(input, format, cls = 'auto', force, locale) {
539
541
  i += 1;
540
542
  }
541
543
  }
542
- if (!ctx.month && (fmt === "YYYY-MM-DD HH:mm:ss")) {
543
- bbn.fn.log(i);
544
- debugger;
545
- }
546
544
  const fullRegex = new RegExp('^' + pattern + '$');
547
545
  let match = fullRegex.exec(input);
548
546
  if (!match) {
@@ -562,6 +560,10 @@ export default function parse(input, format, cls = 'auto', force, locale) {
562
560
  if (value != null && apply) {
563
561
  apply(value);
564
562
  }
563
+ if (!ctx.month && (fmt === "YYYY-MM-DD HH:mm:ss")) {
564
+ bbn.fn.log(i);
565
+ debugger;
566
+ }
565
567
  }
566
568
  // ---- NEW: convert 12h + AM/PM to 24h ----
567
569
  if (ctx.uses12Hour) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.123",
3
+ "version": "2.0.125",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",