@bbn/bbn 1.0.443 → 1.0.444
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.js +3 -2
- package/package.json +1 -1
package/dist/date.js
CHANGED
|
@@ -256,10 +256,11 @@ class bbnDateTool {
|
|
|
256
256
|
const d = new Date();
|
|
257
257
|
return d;
|
|
258
258
|
}
|
|
259
|
-
format(format = '') {
|
|
259
|
+
format(format = 'y-m-d h:n:s') {
|
|
260
260
|
let str = '';
|
|
261
261
|
if (format) {
|
|
262
|
-
const
|
|
262
|
+
const reg = new RegExp('(' + Object.keys(unitsCorrespondence).join('|') + ')', 'g');
|
|
263
|
+
const parts = format.split(reg);
|
|
263
264
|
each(parts, (part) => {
|
|
264
265
|
if (part in unitsCorrespondence) {
|
|
265
266
|
const suffix = unitsMap[unitsCorrespondence[part]].toLowerCase();
|