Quote:
Originally Posted by jordanmeir
can you give me a code example ? i can't find the just one
|
Use code like this:
Code:
NSCalendar *currentCalendar = [NSCalendar currentCalendar];
NSDateComponents components* = [currentCalendar components:
NSYearCalendarUnit + NSMonthCalendarUnit +NSDayCalendarUnit
fromDate: [NSDate date]];
if (components.year == targetYear && components.month = targetMonth &&
components.day = targetDay)
{
//Today is the day!
}