File tree Expand file tree Collapse file tree 6 files changed +12
-14
lines changed Expand file tree Collapse file tree 6 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,5 @@ clkinfo.addInteractive that would cause ReferenceError.
32
32
0.30: Use widget_utils
33
33
0.31: Use clock_info module as an app
34
34
0.32: Make the border of the clock_info box extend all the way to the right of the screen.
35
- 0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
35
+ 0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
36
+ 0.34: Support 12-hour time format
Original file line number Diff line number Diff line change @@ -239,11 +239,9 @@ let drawTime = function() {
239
239
var y = y1 ;
240
240
var date = new Date ( ) ;
241
241
242
- var hours = String ( date . getHours ( ) ) ;
243
- var minutes = date . getMinutes ( ) ;
244
- minutes = minutes < 10 ? String ( "0" ) + minutes : minutes ;
245
- var colon = settings . hideColon ? "" : ":" ;
246
- var timeStr = hours + colon + minutes ;
242
+ var timeStr = locale . time ( date , 1 ) ;
243
+ if ( settings . hideColon )
244
+ timeStr = timeStr . replace ( ":" , "" ) ;
247
245
248
246
// Set y coordinates correctly
249
247
y += parseInt ( ( H - y ) / 2 ) + 5 ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"id" : " bwclk" ,
3
3
"name" : " BW Clock" ,
4
- "version" : " 0.33 " ,
4
+ "version" : " 0.34 " ,
5
5
"description" : " A very minimalistic clock." ,
6
6
"readme" : " README.md" ,
7
7
"icon" : " app.png" ,
Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ clkinfo.addInteractive that would cause ReferenceError.
35
35
Remove invertion of theme as this doesn'twork very well with fastloading.
36
36
Do an quick inital fillRect on theclock info area.
37
37
0.33: Make the border of the clock_info box extend all the way to the right of the screen.
38
- 0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
38
+ 0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
39
+ 0.35: Support 12-hour time format
Original file line number Diff line number Diff line change @@ -199,11 +199,9 @@ let drawTime = function() {
199
199
let y = y1 ;
200
200
let date = new Date ( ) ;
201
201
202
- let hours = String ( date . getHours ( ) ) ;
203
- let minutes = date . getMinutes ( ) ;
204
- minutes = minutes < 10 ? String ( "0" ) + minutes : minutes ;
205
- let colon = settings . hideColon ? "" : ":" ;
206
- let timeStr = hours + colon + minutes ;
202
+ var timeStr = locale . time ( date , 1 ) ;
203
+ if ( settings . hideColon )
204
+ timeStr = timeStr . replace ( ":" , "" ) ;
207
205
208
206
// Set y coordinates correctly
209
207
y += parseInt ( ( H - y ) / 2 ) + 5 ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"id" : " bwclklite" ,
3
3
"name" : " BW Clock Lite" ,
4
- "version" : " 0.34 " ,
4
+ "version" : " 0.35 " ,
5
5
"description" : " A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font." ,
6
6
"readme" : " README.md" ,
7
7
"icon" : " app.png" ,
You can’t perform that action at this time.
0 commit comments