@bbn/bbn 2.0.226 → 2.0.227
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/bbn.sw.js +1 -1
- package/dist/bbn.sw.js.map +1 -1
- package/dist/dt/functions/parse.js +7 -5
- package/dist/dt.d.ts +1 -1
- package/dist/dt.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -565,11 +565,13 @@ export default function parse(input, format, cls = 'auto', force, locale) {
|
|
|
565
565
|
throw new Error(`Date string "${input}" does not match format "${fmt}"`);
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
568
|
+
if (match) {
|
|
569
|
+
for (let idx = 1; idx < match.length; idx++) {
|
|
570
|
+
const value = match[idx];
|
|
571
|
+
const apply = applyFns[idx - 1];
|
|
572
|
+
if (value != null && apply) {
|
|
573
|
+
apply(value);
|
|
574
|
+
}
|
|
573
575
|
}
|
|
574
576
|
}
|
|
575
577
|
// ---- NEW: convert 12h + AM/PM to 24h ----
|
package/dist/dt.d.ts
CHANGED
package/dist/dt.js
CHANGED
|
@@ -241,7 +241,7 @@ dt.duration = (amount, unit) => {
|
|
|
241
241
|
if (amount instanceof Temporal.Duration) {
|
|
242
242
|
return new bbnDtDuration(amount);
|
|
243
243
|
}
|
|
244
|
-
return bbnDtDuration.fromUnit(amount, unit);
|
|
244
|
+
return bbnDtDuration.fromUnit(amount, unit || 'ms');
|
|
245
245
|
};
|
|
246
246
|
dt.zoned = () => { };
|
|
247
247
|
dt.monthDay = () => { };
|
package/dist/index.js
CHANGED