How do I create an NSDate object with a custom date other than the current date? For example I would like to create a var of yesterday or of 2 days ago.
NSDate
Please try below code. I think it's simple.
let today = NSDate() let tomorrow = today.dateByAddingTimeInterval(24 * 60 * 60) let yesterday = today.dateByAddingTimeInterval(-24 * 60 * 60)
Cheers!!!