Pad hours in 24 hour time

This commit is contained in:
raucao committed 2026-10-12 00:51:51 +02:00
1 parent d837a1ffaa
commit 0036fa8afa
1 file changed
+1 -1
+1 -1
View File
@@ -6,7 +6,7 @@ export default class DefaultClockComponent extends Component {
@service clock;
get formattedTime() {
const hours = this.clock.time.getHours();
const hours = this.clock.time.getHours().toString().padStart(2, '0');
const minutes = this.clock.time.getMinutes().toString().padStart(2, '0');
return `${hours}:${minutes}`;
}