X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FUtils.js;h=15ee30711ec2c3645626b0e6af071abd212c71aa;hb=4a56deef7aeca58425c92ec27388bbe34543ad4f;hp=216790bc368bc0e7664810138391d0e41129aa13;hpb=72766a82a1372713a48d9e7143a0348d7fd56a29;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 216790bc..15ee3071 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -128,7 +128,7 @@ class Utils { static basicFormatLog(prefixString = '') { const date = new Date(); - return date.toISOString().substr(0, 19) + prefixString; + return date.toLocaleString() + prefixString; } static objectHasOwnProperty(object, property) { @@ -145,6 +145,13 @@ class Utils { } return false; } + + static isEmptyArray(object) { + if (Array.isArray(object) && object.length > 0) { + return false; + } + return true; + } } module.exports = Utils;