@bbn/bbn 2.0.125 → 2.0.127
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 +2 -8
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
const lc = function (str, localeCode) {
|
|
10
9
|
try {
|
|
11
10
|
return localeCode ? str.toLocaleLowerCase(localeCode) : str.toLowerCase();
|
|
@@ -113,8 +112,8 @@ export default function parse(input, format, cls = 'auto', force, locale) {
|
|
|
113
112
|
throw new Error('Invalid minute: ' + n);
|
|
114
113
|
}
|
|
115
114
|
// NOTE: kept as in your original code, even though name suggests minutes.
|
|
116
|
-
ctx.
|
|
117
|
-
ctx.
|
|
115
|
+
ctx.minute = n;
|
|
116
|
+
ctx.hasMinute = true;
|
|
118
117
|
}
|
|
119
118
|
},
|
|
120
119
|
{
|
|
@@ -527,7 +526,6 @@ export default function parse(input, format, cls = 'auto', force, locale) {
|
|
|
527
526
|
if (matchedToken) {
|
|
528
527
|
pattern += `(${matchedToken.regex})`;
|
|
529
528
|
if (matchedToken.apply) {
|
|
530
|
-
log(matchedToken);
|
|
531
529
|
applyFns.push(value => matchedToken.apply(value, ctx));
|
|
532
530
|
}
|
|
533
531
|
else {
|
|
@@ -560,10 +558,6 @@ export default function parse(input, format, cls = 'auto', force, locale) {
|
|
|
560
558
|
if (value != null && apply) {
|
|
561
559
|
apply(value);
|
|
562
560
|
}
|
|
563
|
-
if (!ctx.month && (fmt === "YYYY-MM-DD HH:mm:ss")) {
|
|
564
|
-
bbn.fn.log(i);
|
|
565
|
-
debugger;
|
|
566
|
-
}
|
|
567
561
|
}
|
|
568
562
|
// ---- NEW: convert 12h + AM/PM to 24h ----
|
|
569
563
|
if (ctx.uses12Hour) {
|