Merge pull request #858 from radiorabe/chore/refactor-to-use-date.format

Use proper date.format call in js
This commit is contained in:
Kyle Robbertze 2019-08-18 22:10:08 +02:00 committed by GitHub
commit 254d778304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,16 +20,7 @@ function scheduleRefetchEvents(json) {
} }
function makeTimeStamp(date) { function makeTimeStamp(date) {
var sy, sm, sd, h, m, s, timestamp; return date.format('YYYY-MM-DD HH:mm:ss');
sy = date.getFullYear();
sm = date.getMonth() + 1;
sd = date.getDate();
h = date.getHours();
m = date.getMinutes();
s = date.getSeconds();
timestamp = sy + "-" + pad(sm, 2) + "-" + pad(sd, 2) + " " + pad(h, 2) + ":" + pad(m, 2) + ":" + pad(s, 2);
return timestamp;
} }
function dayClick(date, allDay, jsEvent, view) { function dayClick(date, allDay, jsEvent, view) {