Skip to content

Commit 480e6c9

Browse files
committed
[bug] fix clock 12am not displaying correctly
1 parent 4d9b662 commit 480e6c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/js/clock.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ var clock = (function(){
3434
if(!state.get.current().header.clock.hour24.show&&timeDateNow.hours()>12){
3535
timeStrings.hours=timeStrings.hours-12;
3636
};
37+
if(!state.get.current().header.clock.hour24.show&&timeDateNow.hours()==0){
38+
timeStrings.hours=12;
39+
};
3740
timeStrings.hours=helper.toWords(timeStrings.hours);
3841
if(state.get.current().header.clock.hour24.show&&timeDateNow.hours()>0&&timeDateNow.hours()<10){
3942
timeStrings.hours="Zero "+timeStrings.hours;
@@ -44,6 +47,9 @@ var clock = (function(){
4447
if(!state.get.current().header.clock.hour24.show&&timeDateNow.hours()>12){
4548
timeStrings.hours=timeStrings.hours-12;
4649
};
50+
if(!state.get.current().header.clock.hour24.show&&timeDateNow.hours()==0){
51+
timeStrings.hours=12;
52+
};
4753
if(state.get.current().header.clock.hour24.show&&timeDateNow.hours()<10){
4854
timeStrings.hours="0"+timeStrings.hours;
4955
};

0 commit comments

Comments
(0)