Created
October 5, 2012 09:04
-
-
Save eienf/3838844 to your computer and use it in GitHub Desktop.
Convert NSDate from NSCalendarDate
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
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
NSCalendarDate *cDate = [NSCalendarDate date]; | |
NSLog(@"calendar date = %@",cDate); | |
NSDate *aDate = [NSDate date]; | |
NSLog(@"calendar date = %@",aDate); | |
cDate = [NSCalendarDate dateWithTimeInterval:0 sinceDate:aDate]; | |
NSLog(@"calendar date = %@",cDate); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment