I have to implement in my app where after a user had saved his recording, I will have to determine if 24 hours have passed from the creation date of that recording. So far what I have at the moment is just to determine if current date is not equal to the creation date. I really appreciate anybody's help, thanks in advance.
相关问题
- Check if NSDate is in this week or next week
- How to give an imageView in swift3.0.1 shadow at t
- Swift 3: How to reverse a transparent Navigation B
- Changing background according to time - Objective
- How to add th and st in Date Format
相关文章
- Swift Change the tableviewcell border color accord
- Cocoapods : target has transitive dependencies tha
- Error Domain=kAFAssistantErrorDomain Code=209 “(nu
- UIImagePickerController delegate not called Swift
- Simple service in Swift, persists, foreground only
- Escape NSDateFormatter String
- iOS swift NSMutableData has no member appendString
- Conforming to Hashable protocol?
You can use
UserDefault
to save the date upon creation of the record. The syntax will beWhenever you want to check the saved date, retrieve it in this way
You can easily check if the time interval since date is greater or equal to a TTL of 24 hours.