Created
July 31, 2015 14:55
-
-
Save Xinguang/ff4add265834385faed0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Int { | |
var days: NSTimeInterval { | |
let DAY_IN_SECONDS = 60 * 60 * 24 | |
var days:Double = Double(DAY_IN_SECONDS) * Double(self) | |
return days | |
} | |
} | |
let date = NSDate() | |
let twoDaysAgo = NSDate(timeInterval: -3.days, sinceDate: date) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment