summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-15 01:11:48 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-15 01:11:48 +0800
commit3ecfa34824d0842f21c925150afd1ec2b62630c0 (patch)
treed0447b05898521845a6007c51623061c713ec902 /services
parent318965ec16b11b2e5b454978a282521e74b2220a (diff)
timedate: animated time
Diffstat (limited to 'services')
-rw-r--r--services/TimeDate.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/TimeDate.qml b/services/TimeDate.qml
index 9c5b8df..fab2beb 100644
--- a/services/TimeDate.qml
+++ b/services/TimeDate.qml
@@ -15,6 +15,16 @@ Singleton {
h = 12;
return (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s;
}
+ readonly property int hours: {
+ var h = clock.date.getHours();
+ h = h % 12;
+ if (h === 0)
+ h = 12;
+ return h;
+ }
+ readonly property int minutes: clock.date.getMinutes()
+ readonly property int seconds: clock.date.getSeconds()
+
readonly property string date: Qt.formatDateTime(clock.date, "dddd dd/MM")
SystemClock {