updates and additions
[webos-internals:modifications.git] / top-bar / top-bar-am-pm-indicator-in-top-bar.patch
1 diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
2 index 0e239cc..955cc1e 100644
3 --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
4 +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
5 @@ -2988,7 +2988,13 @@ updateClockEveryMinute: function() {
6         else
7                 format = Mojo.Format.getFormatHash()['shortTime24'];
8         format = format.replace(/\s?a\s?/,"");  
9 -       Mojo.Dom.get('clock').innerHTML = Mojo.Format.formatDate(date, {time: format});                         
10 +       var suffix = "";
11 +       if(new Date().getHours() < 12) {
12 +               suffix = "a";
13 +       } else {
14 +               suffix = "p";
15 +       }
16 +       Mojo.Dom.get('clock').innerHTML = Mojo.Format.formatDate(date, {time: format}) + suffix;
17         Mojo.Dom.get('today').innerHTML = Mojo.Format.formatDate(date,{date:'short'});
18  },
19