/ Published in: Objective C
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Get the time NSCalendarUnit unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; // Turn the date into Integers NSInteger year = [dateComponents year]; NSInteger month = [dateComponents month]; NSInteger day = [dateComponents day]; NSInteger hour = [dateComponents hour]; NSInteger min = [dateComponents minute]; NSInteger sec = [dateComponents second];
URL: http://www.satosoft.com/index.php/2009/02/05/using-nsdate-for-the-time-andor-date/