fixed 24h bug

This commit is contained in:
Manuel Friedli 2014-06-28 23:46:12 +02:00
parent 348177e52a
commit 340669c5eb
5 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# 6.2 # 6.2.1
COPYING COPYING
README.md README.md

View file

@ -71,7 +71,7 @@ var layout = {
"getHour": function(date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return hour + 1; return (hour + 1) % 24;
} }
return hour; return hour;
} }

View file

@ -1,3 +1,4 @@
/* /*
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -72,7 +73,7 @@ var layout = {
"getHour": function(date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return hour + 1; return (hour + 1) % 24;
} }
return hour; return hour;
} }

View file

@ -70,7 +70,7 @@ var layout = {
"getHour": function(date) { "getHour": function(date) {
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 35) { if (date.getMinutes() >= 35) {
return hour + 1; return (hour + 1) % 24;
} }
return hour; return hour;
} }

2
uhr.js
View file

@ -175,7 +175,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
} }
var hour = date.getHours(); var hour = date.getHours();
if (date.getMinutes() >= 25) { if (date.getMinutes() >= 25) {
return hour + 1; return (hour + 1) % 24;
} }
return hour; return hour;
}, },