NSDateFormatter

ISO 8601
-(NSString *) strFromISO8601:(NSDate *) date { static NSDateFormatter* sISO8601 = nil; if (!sISO8601) { sISO8601 = [[NSDateFormatter alloc] init];       NSTimeZone *timeZone = [NSTimeZone localTimeZone];        int offset = [timeZone secondsFromGMT];        NSMutableString *strFormat = [NSMutableString stringWithString:@"yyyyMMdd'T'HH:mm:ss"];        offset /= 60; //bring down to minutes        if (offset == 0)            [strFormat appendString:ISO_TIMEZONE_UTC_FORMAT];        else            [strFormat appendFormat:ISO_TIMEZONE_OFFSET_FORMAT, offset / 60, offset % 60];        [sISO8601 setTimeStyle:NSDateFormatterFullStyle];        [sISO8601 setDateFormat:strFormat];    }    return[sISO8601 stringFromDate:date];  -(NSDate *) dateFromISO8601:(NSString *) str {    static NSDateFormatter* sISO8601 = nil;    if (!sISO8601) {        sISO8601 = [[NSDateFormatter alloc] init];        [sISO8601 setTimeStyle:NSDateFormatterFullStyle];        [sISO8601 setDateFormat:@"yyyyMMdd'T'HH:mm:ss"];    }    if ([str hasSuffix:@"Z"]) {        str = [str substringToIndex:(str.length-1)];    }    NSDate *d = [sISO8601 dateFromString:str];    return d; }
 * http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
 * http://en.wikipedia.org/wiki/ISO_8601
 * http://www.stepcase.com/blog/2008/12/02/format-string-for-the-iphone-nsdateformatter/
 * http://stackoverflow.com/questions/2201216/is-there-a-simple-way-of-converting-an-iso8601-timestamp-to-a-formatted-nsdate
 * http://www.radupoenaru.com/processing-nsdate-into-an-iso8601-string/
 * http://www.cocoabuilder.com/archive/cocoa/235618-nsdateformatter-for-iso8601.html
 * http://boredzo.org/iso8601parser/

Formatting
//create a date formatter with standard locale, then:
 * http://stackoverflow.com/questions/1101631/using-nsdateformatter-on-the-iphone-protect-locale-but-lose-date-components

// have to set a date style before dateFormat will give you a string back [dateFormatter setDateStyle:NSDateFormatterMediumStyle];

// read out the format string NSString *format = [dateFormatter dateFormat]; format = [format stringByReplacingOccurrencesOfString:@"y" withString:@""]; [dateFormatter setDateFormat:format]; Let me correct myself, the class method +dateFormatFromTemplate:options:locale: does appear smart enough to fix the date string formatting. For example, if I give it the template @"d-MMMM" it returns MMMM d for US localization and M月d日 for Japanese. So, clearly you can remove the components in some fixed localization, then have it translate to the current locale. +dateFormatFromTemplate:options:locale: