cocoa - Number of days in the current month using iPhone SDK? -
A fairly straight forward question, I am trying to figure out how I can use the number of current days in the current month. Something similar in NSDate or Cocoa touch Thank you.
You enter NSDate
and NSCalendar
classes: />
NSDT * today = [NSDT date]; // Get date objects for today's date NSCalendar * c = [NSCalendar currentCalendar]; NSRZ Day = [C categoryFUNIT: NSDA calendarUnitINIT: NSMOuthCalendar Date for Permission: Today];
today
a NSDate
object represents the current date; It can be used to complete the number of days in the current month. An NSCalendar
object is immediately used, with the NSDate
for the current code, to return the number of days in the current month, range offent: Inuinate: For date:
function.
Day. The length will be the number of days in the current month.
These are links to docs and if you want more information.