diff --git a/Yep/ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift b/Yep/ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift index 0af2cd8b..a3075175 100644 --- a/Yep/ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift +++ b/Yep/ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift @@ -94,10 +94,10 @@ extension DoNotDisturbPeriodViewController: UIPickerViewDataSource, UIPickerView func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String! { if component == 0 { - return "\(row % 24)" + return String(format: "%02d", row % 24) } else if component == 1 { - return "\(row % 60)" + return String(format: "%02d", row % 60) } return "" diff --git a/Yep/ViewControllers/Notifications/NotificationsViewController.swift b/Yep/ViewControllers/Notifications/NotificationsViewController.swift index e0edf343..ed725fa4 100644 --- a/Yep/ViewControllers/Notifications/NotificationsViewController.swift +++ b/Yep/ViewControllers/Notifications/NotificationsViewController.swift @@ -18,10 +18,10 @@ struct DoNotDisturbPeriod { var toMinute: Int = 30 var fromString: String { - return "\(fromHour):\(fromMinute)" + return String(format: "%02d:%02d", fromHour, fromMinute) } var toString: String { - return "\(toHour):\(toMinute)" + return String(format: "%02d:%02d", toHour, toMinute) } }