X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2Fdatetime.js;h=5addd255554a3fd365aaed01e0c254422a2afdcd;hp=49b70caf1116e0876e8c784084cc05510f95b93e;hb=dac395887d96e2d642b209c6db6aaacc3ffacb34;hpb=5fde3a01497262862afc4cb4c9457d4e0ad69a4a diff --git a/client/src/utils/datetime.js b/client/src/utils/datetime.js index 49b70caf..5addd255 100644 --- a/client/src/utils/datetime.js +++ b/client/src/utils/datetime.js @@ -1,17 +1,17 @@ function zeroPad(x) { - return (x<10 ? "0" : "") + x; + return (x<10 ? "0" : "") + x; } export function getDate(d) { - return d.getFullYear() + '-' + zeroPad(d.getMonth()+1) + '-' + zeroPad(d.getDate()); + return d.getFullYear() + '-' + zeroPad(d.getMonth()+1) + '-' + zeroPad(d.getDate()); } export function getTime(d) { - return zeroPad(d.getHours()) + ":" + zeroPad(d.getMinutes()) + ":" + - zeroPad(d.getSeconds()); + return zeroPad(d.getHours()) + ":" + zeroPad(d.getMinutes()) + ":" + + zeroPad(d.getSeconds()); } function padDigits(x)