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
### Keybase proof | |
I hereby claim: | |
* I am nickplace on github. | |
* I am nickplace (https://keybase.io/nickplace) on keybase. | |
* I have a public key ASCKbqDliCJ-p9lqzohBD3o7Re075FZujF76SzE-K1MKOAo | |
To claim this, I am signing this object: |
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
NSDate startDate = ...; | |
NSDate endDate = ...; | |
NSTimeInterval startDays = ceil( [startDate timeIntervalSince1970] / 86400); // there are 86400 seconds in a day | |
NSTimeInterval endDays = ceil ( [endDate timeIntervalSince1970] / 86400); | |
int days = endDays - startDays; |