mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-26 22:07:12 +00:00
Leading zeros for day, hour and minute counter
This commit is contained in:
1 parent
5b424e0bef
commit
81827aaf9b
1 file changed
+3
-3
@@ -144,9 +144,9 @@ class RegattaViewController : UIViewController, UIActionSheetDelegate, UINavigat
|
||||
let days = floor(delta / secondsInDay)
|
||||
let hours = floor((delta - days * secondsInDay) / secondsInHour)
|
||||
let minutes = floor((delta - days * secondsInDay - hours * secondsInHour) / 60.0)
|
||||
self.countdownDaysLabel.text = String(format: "%.0f", arguments: [days])
|
||||
self.countdownHoursLabel.text = String(format: "%.0f", arguments: [hours])
|
||||
self.countdownMinutesLabel.text = String(format: "%.0f", arguments: [minutes])
|
||||
self.countdownDaysLabel.text = String(format: "%02d", Int(days))
|
||||
self.countdownHoursLabel.text = String(format: "%02d", Int(hours))
|
||||
self.countdownMinutesLabel.text = String(format: "%02d", Int(minutes))
|
||||
self.countdownView.hidden = false
|
||||
self.countdownViewHeight.constant = 60
|
||||
timer?.invalidate()
|
||||
|
||||
Reference in new issue
Block a user