Fixed NSDate get year/month/day #dev #it #asnwer
Fixed NSDate get year/month/day #dev #it #asnwer
NSDate get year/month/day
How can I get the year/month/day of a NSDate object, given no other information? I realize that I could probably do this with something similar to this:
NSCalendar *cal = [[NSCalendar alloc] init]; NSDateComponents *components = [cal components:0 fromDate:date]; int year = [components year]; int month = [components month]; int day = [components day];
But that seems to…
View On WordPress












