From 37ffd4fc97a29170a47706d118619be334c4ee3b Mon Sep 17 00:00:00 2001 From: mrdrogdrog <tilman.vatteroth@udo.edu> Date: Fri, 18 Dec 2015 12:46:08 +0100 Subject: [PATCH] Datumsfehler im UFC Panel behoben --- panels/ufc/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/ufc/script.js b/panels/ufc/script.js index ba8a426..688a8e4 100644 --- a/panels/ufc/script.js +++ b/panels/ufc/script.js @@ -31,12 +31,12 @@ this.checkShowCondition=function() { } this.dow = function(d) { - if (typeof(d)!='number' || d <= 0 || d >= 7) + if (typeof(d)!='number' || d < 0 || d >= 7) return undefined; return ["So","Mo","Di","Mi","Do","Fr,","Sa"][d]; } this.getLongMonth = function(month){ - if (typeof(month)!='number' || month <= 0 || month >= 12) + if (typeof(month)!='number' || month < 0 || month >= 12) return undefined; return ["Januar","Feburar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"][month]; } @@ -65,7 +65,7 @@ this.show=function() { tag = tag < 10 ? "0" + tag : tag; h = h < 10 ? "0" + h : h; m = m < 10 ? "0" + m : m; - + zeitDiv.text( this.dow(d.getDay()) + ", " + tag + ". " + -- GitLab