@bbn/bbn 2.0.13 → 2.0.14
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/date.d.ts +1 -0
- package/dist/date.js +15 -0
- package/package.json +1 -1
package/dist/date.d.ts
CHANGED
package/dist/date.js
CHANGED
|
@@ -450,6 +450,17 @@ class bbnDateTool {
|
|
|
450
450
|
ctx.month = n;
|
|
451
451
|
}
|
|
452
452
|
},
|
|
453
|
+
{
|
|
454
|
+
token: 'mm',
|
|
455
|
+
regex: '\\d{2}',
|
|
456
|
+
apply: v => {
|
|
457
|
+
const n = parseInt(v, 10);
|
|
458
|
+
if (n < 0 || n > 59) {
|
|
459
|
+
throw new Error('Invalid minute: ' + n);
|
|
460
|
+
}
|
|
461
|
+
ctx.month = n;
|
|
462
|
+
}
|
|
463
|
+
},
|
|
453
464
|
{
|
|
454
465
|
token: 'M',
|
|
455
466
|
regex: '\\d{1,2}',
|
|
@@ -979,6 +990,10 @@ class bbnDateTool {
|
|
|
979
990
|
const i = parseInt(this.minute().toString());
|
|
980
991
|
return i < 10 ? '0' + i.toString() : i.toString();
|
|
981
992
|
}
|
|
993
|
+
get mm() {
|
|
994
|
+
const i = parseInt(this.minute().toString());
|
|
995
|
+
return i < 10 ? '0' + i.toString() : i.toString();
|
|
996
|
+
}
|
|
982
997
|
get I() {
|
|
983
998
|
return this.minute().toString();
|
|
984
999
|
}
|