Skip to content
Snippets Groups Projects
Commit 5d874697 authored by Rico van Endern's avatar Rico van Endern
Browse files

Merged in dev (pull request #42)


Ich bin ein Pferd

Approved-by: default avatarRico van Endern <rico.vanendern@udo.edu>
parents 884fe21d 095d19c8
Branches
No related tags found
No related merge requests found
...@@ -44,13 +44,15 @@ function padTwo(num) { ...@@ -44,13 +44,15 @@ function padTwo(num) {
function isNextDay() { function isNextDay() {
if (new Date().getHours() >= 15) { if (new Date().getHours() >= 15) {
console.log("NEXT")
return true; return true;
} }
console.log("CURRENT")
return false; return false;
} }
function calcDateAPI() { function calcDateAPI() {
if (isNextDay) { if (isNextDay()) {
return new Date().getFullYear() + "-" + padTwo(new Date().getMonth()+1) + "-" + (padTwo(new Date().getDate() + 1)); return new Date().getFullYear() + "-" + padTwo(new Date().getMonth()+1) + "-" + (padTwo(new Date().getDate() + 1));
} else { } else {
return new Date().getFullYear() + "-" + padTwo(new Date().getMonth()+1) + "-" + padTwo(new Date().getDate()); return new Date().getFullYear() + "-" + padTwo(new Date().getMonth()+1) + "-" + padTwo(new Date().getDate());
...@@ -58,7 +60,7 @@ function calcDateAPI() { ...@@ -58,7 +60,7 @@ function calcDateAPI() {
} }
function calcTextDisplay() { function calcTextDisplay() {
if (isNextDay) { if (isNextDay()) {
return "Mensaplan von MORGEN, dem " + (padTwo(new Date().getDate() + 1)) +"."+ padTwo(new Date().getMonth()+1) +"."+ new Date().getFullYear(); return "Mensaplan von MORGEN, dem " + (padTwo(new Date().getDate() + 1)) +"."+ padTwo(new Date().getMonth()+1) +"."+ new Date().getFullYear();
} else { } else {
return "Mensaplan von HEUTE, dem " + padTwo(new Date().getDate()) +"."+ padTwo(new Date().getMonth()+1) +"."+ new Date().getFullYear(); return "Mensaplan von HEUTE, dem " + padTwo(new Date().getDate()) +"."+ padTwo(new Date().getMonth()+1) +"."+ new Date().getFullYear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment