forked from FOSS/BangleApps
Merge pull request #2788 from stweedo/12_hour_lead_zero
Update locale.html to remove leading zero in 12 hour modemaster
commit
eade9c7c98
|
@ -156,7 +156,7 @@ exports = { name : "en_GB", currencySym:"£",
|
||||||
"%-m": "d.getMonth()+1",
|
"%-m": "d.getMonth()+1",
|
||||||
"%d": "('0'+d.getDate()).slice(-2)",
|
"%d": "('0'+d.getDate()).slice(-2)",
|
||||||
"%-d": "d.getDate()",
|
"%-d": "d.getDate()",
|
||||||
"%HH": "('0'+getHours(d)).slice(-2)",
|
"%HH": "getHours(d)",
|
||||||
"%MM": "('0'+d.getMinutes()).slice(-2)",
|
"%MM": "('0'+d.getMinutes()).slice(-2)",
|
||||||
"%SS": "('0'+d.getSeconds()).slice(-2)",
|
"%SS": "('0'+d.getSeconds()).slice(-2)",
|
||||||
"%A": `${js(locale.day)}.split(',')[d.getDay()]`,
|
"%A": `${js(locale.day)}.split(',')[d.getDay()]`,
|
||||||
|
@ -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 h;
|
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