Credit internet for MathExpressions and now display 12-hour clock instead of 24 hour

This commit is contained in:
Andrew
2021-01-21 17:15:52 -05:00
parent c187403e29
commit 2cbfa70658
3 changed files with 14 additions and 6 deletions
+3
View File
@@ -67,6 +67,9 @@ class AlarmTableCell: UITableViewCell
{
descriptionText.text = "- " + alarm.text
ampm.text = alarm.hour<12 || alarm.hour==24 ? "AM":"PM"
if alarm.hour > 12{
alarm.hour -= 12
}
time.text = alarm.minute<10 ? "\(alarm.hour)" + ":" + "0" + "\(alarm.minute)":"\(alarm.hour)" + ":" + "\(alarm.minute)"
// displays the specific days alarm is activated