@bbn/bbn 2.0.124 → 2.0.126

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();
@@ -112,8 +113,8 @@ export default function parse(input, format, cls = 'auto', force, locale) {
112
113
  throw new Error('Invalid minute: ' + n);
113
114
  }
114
115
  // NOTE: kept as in your original code, even though name suggests minutes.
115
- ctx.month = n;
116
- ctx.hasMonth = true;
116
+ ctx.minute = n;
117
+ ctx.hasMinute = true;
117
118
  }
118
119
  },
119
120
  {
@@ -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 {
@@ -558,10 +560,6 @@ export default function parse(input, format, cls = 'auto', force, locale) {
558
560
  if (value != null && apply) {
559
561
  apply(value);
560
562
  }
561
- if (!ctx.month && (fmt === "YYYY-MM-DD HH:mm:ss")) {
562
- bbn.fn.log(i);
563
- debugger;
564
- }
565
563
  }
566
564
  // ---- NEW: convert 12h + AM/PM to 24h ----
567
565
  if (ctx.uses12Hour) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.124",
3
+ "version": "2.0.126",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",