Friday 17 January 2014

Locale Date String from Time Interval

 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateStyle:NSDateFormatterShortStyle];
    [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
    [dateFormatter setLocale:[NSLocale currentLocale]];
 NSString *dateString = [dateFormatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:sometimeInterval]];

No comments:

Post a Comment