How can i calculate the number of days in a year for any calendar, not just gregorian. I have tried this
NSUInteger *days = [[NSCalendar currentCalendar] range
[[NSCalendar currentCalendar] ordinalityOfUnit:NSYearCalendarUnit inUnit:NSEraCalendarUnit forDate:date];