Merge pull request #866 from radiorabe/fix/date-format-change

Revert "♻️ (js) use proper date.format call"
This commit is contained in:
Kyle Robbertze 2019-08-31 10:22:52 +02:00 committed by GitHub
commit e26b9c2721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -20,7 +20,16 @@ function scheduleRefetchEvents(json) {
}
function makeTimeStamp(date) {
return date.format('YYYY-MM-DD HH:mm:ss');
var sy, sm, sd, h, m, s, timestamp;
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) {