Adding number of days to a date, and I would round up to midnight. How is it possible in Swift?
guard let expirationDate = Calendar.current.date(byAdding: .day, value: expirationDays, to: p.createdAt!) else {
return false
}
Adding number of days to a date, and I would round up to midnight. How is it possible in Swift?
guard let expirationDate = Calendar.current.date(byAdding: .day, value: expirationDays, to: p.createdAt!) else {
return false
}