Skip to content
Snippets Groups Projects
Commit 17d28c25 authored by Hotte's avatar Hotte
Browse files

Ich bin ein Pferd

parent 218872fa
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ this.checkShowCondition = function() { ...@@ -4,7 +4,7 @@ this.checkShowCondition = function() {
return 4*this.tabtime; return 4*this.tabtime;
} }
this.show = function() { this.show = function() {
// switch tabs // switch tabs
this.interval=setInterval(function() { this.interval=setInterval(function() {
var currentTab = $("#tabs").tabs('option', 'active'); var currentTab = $("#tabs").tabs('option', 'active');
...@@ -43,14 +43,16 @@ function padTwo(num) { ...@@ -43,14 +43,16 @@ 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