Vote count:
0
I am trying to compare two date strings in Swift. If the store closes at 2:59 am but opens at 12:00 am, they can't have the same default date in date picker.
storeClose = "02:59:00"
storeOpen = "12:00:00"
if ([storeClose compare:storeOpen] == NSOrderedAscending)
{
NSLog(@"One day added to closing time.");
}
This is my code from Objective-C.
How can I convert this to Swift?
asked 12 secs ago
Comparing date strings in Swift
Aucun commentaire:
Enregistrer un commentaire