Merge lp:~vthompson/ubuntu-weather-app/reboot-time-of-day into lp:ubuntu-weather-app

Proposed by Victor Thompson on 2015-06-15
Status: Merged
Approved by: Nekhelesh Ramananthan on 2015-06-21
Approved revision: 54
Merged at revision: 54
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-time-of-day
Merge into: lp:ubuntu-weather-app
Diff against target: 21 lines (+3/-1)
1 file modified
app/components/HomeHourly.qml (+3/-1)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-time-of-day
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-06-21
Nekhelesh Ramananthan (community) 2015-06-15 Approve on 2015-06-21
Review via email: mp+261921@code.launchpad.net

Commit message

Show am/pm text depending upon locale

Description of the change

Show am/pm text depending upon locale

To post a comment you must log in.
Nekhelesh Ramananthan (nik90) wrote :

Added a small inline comment.

review: Needs Fixing
54. By Victor Thompson on 2015-06-21

modify text string

Victor Thompson (vthompson) wrote :

I've updated the formatting of the text string.

Nekhelesh Ramananthan (nik90) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/HomeHourly.qml'
2--- app/components/HomeHourly.qml 2015-06-18 01:42:03 +0000
3+++ app/components/HomeHourly.qml 2015-06-21 16:11:15 +0000
4@@ -28,6 +28,8 @@
5 model: forecasts.length
6 orientation: ListView.Horizontal
7
8+ property string currentDate: Qt.formatTime(new Date())
9+
10 onVisibleChanged: {
11 if(visible) {
12 ListView.model = forecasts.length
13@@ -60,7 +62,7 @@
14 anchors.horizontalCenter: parent.horizontalCenter
15 fontSize: "small"
16 font.weight: Font.Light
17- text: formatTimestamp(hourData.date, 'ddd')+" "+formatTime(hourData.date, 'h:mm')
18+ text: currentDate.search(Qt.locale().amText) !== -1 || currentDate.search(Qt.locale().pmText) !== -1 ? "%1 %2".arg(formatTimestamp(hourData.date, 'ddd')).arg(formatTime(hourData.date, 'hap')) : "%1 %2".arg(formatTimestamp(hourData.date, 'ddd')).arg(formatTime(hourData.date, 'h:mm'))
19 }
20
21 Item {

Subscribers

People subscribed via source and target branches

to all changes: