Return to Snippet

Revision: 29085
at July 21, 2010 03:27 by rabc


Initial Code
// number of day in month
NSCalendar* cal = [NSCalendar currentCalendar];
NSDateComponents* comps = [[[NSDateComponents alloc] init] autorelease];
[comps setMonth:[[monthFormat stringFromDate:[NSDate date]] intValue]];
NSRange range = [cal rangeOfUnit:NSDayCalendarUnit
		         inUnit:NSMonthCalendarUnit
			 forDate:[cal dateFromComponents:comps]];

Initial URL


Initial Description


Initial Title
Number of days in a month

Initial Tags
iphone

Initial Language
Objective C