Update locale.html - fixes missing lead zero in 24 hour mode
parent
39f9d66041
commit
7df499d277
|
|
@ -192,8 +192,8 @@ var is12;
|
||||||
function getHours(d) {
|
function getHours(d) {
|
||||||
var h = d.getHours();
|
var h = d.getHours();
|
||||||
if (is12 === undefined) is12 = (require('Storage').readJSON('setting.json', 1) || {})["12hour"];
|
if (is12 === undefined) is12 = (require('Storage').readJSON('setting.json', 1) || {})["12hour"];
|
||||||
if (!is12) return ('0'+h).slice(-2); // return with leading zero in 24-hour format
|
if (!is12) return ('0' + h).slice(-2);
|
||||||
return (h % 12 == 0) ? 12 : h % 12;
|
return ((h % 12 == 0) ? 12 : h % 12).toString();
|
||||||
}
|
}
|
||||||
exports = {
|
exports = {
|
||||||
name: ${js(locale.lang)},
|
name: ${js(locale.lang)},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue