转自:http://jinkeu.blog.163.com/blog/static/2089212920111255385161/
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.timeZone = [NSTimeZone localTimeZone];
NSDate *today = [NSDate date];
NSCalendar *gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] autorelease];
NSDateComponents *components = [gregorian components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekdayCalendarUnit) fromDate:today];
NSString *timeString = [NSString stringWithFormat:@"%d年%d月%d日星期%d",[components year],[components month], [components day], [components weekday]];
NSLog(@"timeString:%@",timeString);
BR_RELEASE(dateFormatter);
BR_RELEASE(gregorian);