[bug] fix clock 12am not displaying correctly

This commit is contained in:
zombieFox 2019-12-29 18:15:37 -07:00
parent 4d9b6628ae
commit 480e6c9f91

View File

@ -34,6 +34,9 @@ var clock = (function() {
if (!state.get.current().header.clock.hour24.show && timeDateNow.hours() > 12) {
timeStrings.hours = timeStrings.hours - 12;
};
if (!state.get.current().header.clock.hour24.show && timeDateNow.hours() == 0) {
timeStrings.hours = 12;
};
timeStrings.hours = helper.toWords(timeStrings.hours);
if (state.get.current().header.clock.hour24.show && timeDateNow.hours() > 0 && timeDateNow.hours() < 10) {
timeStrings.hours = "Zero " + timeStrings.hours;
@ -44,6 +47,9 @@ var clock = (function() {
if (!state.get.current().header.clock.hour24.show && timeDateNow.hours() > 12) {
timeStrings.hours = timeStrings.hours - 12;
};
if (!state.get.current().header.clock.hour24.show && timeDateNow.hours() == 0) {
timeStrings.hours = 12;
};
if (state.get.current().header.clock.hour24.show && timeDateNow.hours() < 10) {
timeStrings.hours = "0" + timeStrings.hours;
};