Created
October 24, 2014 18:26
-
-
Save jpotts18/cef15123c18f6d0bac65 to your computer and use it in GitHub Desktop.
Reopening classes
This file contains hidden or 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