[O] Optimize alarm activation code

This commit is contained in:
Hykilpikonna
2021-01-27 17:37:21 -05:00
parent 23635612a1
commit 656930cb7c
3 changed files with 17 additions and 19 deletions
+2 -2
View File
@@ -13,10 +13,10 @@ import UIKit
extension Date
{
/// Add toString to Date
func str() -> String
func str(_ format: String = "yyyy-MM-dd hh:mm:ss") -> String
{
let f = DateFormatter()
f.dateFormat = "yyyy-MM-dd hh:mm:ss"
f.dateFormat = format
return f.string(from: self)
}