Add current hours and minutes on display

This commit is contained in:
Peter Maquiran
2021-01-04 11:34:43 +01:00
parent bc4c8c4761
commit 1d2b52a0a8
2 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
</ion-label>
<div class="next-meeting">
<div class="meeting-time">08:30</div>
<div class="meeting-time">{{hoursMinutes}}</div>
<div class="meeting-description">Reunião de Conselho de Ministros no Palácio Presidencial</div>
</div>
+20
View File
@@ -48,6 +48,7 @@ export class EventsPage implements OnInit {
customText = false;
totalEvent=0;
currentHoursMinutes: String;
showLoader: boolean;
@@ -59,6 +60,15 @@ export class EventsPage implements OnInit {
private modalController: ModalController,
private authService: AuthService) {
this.prEventList = null;
// update hours and time
setInterval(()=> {
let d = new Date();
let n = d.toLocaleTimeString();
this.currentHoursMinutes = n.slice(0,5);
}, 1000);
}
ngOnInit() {
@@ -217,5 +227,15 @@ export class EventsPage implements OnInit {
return await modal.present();
}
/**
* @returns time in format HH:MM:SS
*/
get hoursMinutes():String {
return this.currentHoursMinutes;
}
}