fixed 24h bug
This commit is contained in:
parent
348177e52a
commit
340669c5eb
5 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# 6.2
|
# 6.2.1
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
README.md
|
README.md
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
2
uhr.js
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue