Thursday, June 28, 2012

Get number of days in a month

NSDate *today=[NSDate date];


NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSRange days = [gregorian rangeOfUnit:NSDayCalendarUnit inUnit:NSMonthCalendarUnit forDate:date];
int daysInGivenMonth= days.length;






1 comment:


  1. nice blogs.
    Friend chatMake new friend’s without revealing yourself. Dial 543216 at Rs 2/min and monthly subscription of Rs 30/ 30 days.

    ReplyDelete