curso programacion iphone

Create a NSDate from its components (day, month, year)

You don’t use a init method in NSDate, instead, you use a method of NSCalendar (dateFromComponents:):

Method that initializes a NSDate form an ISO 8601 date representation (YYYYMMDD):

Tokenize a NSDate into its components (day, month, year, etc…)

You also use a method form NSCalendar(components:fromDate):

Tokenize the difference between 2 dates into its components (day, month, year, etc…)

Use a similar method from NSCalendar: components:fromDate:toDate:options:

Tagged with:  

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>