w: 1~53 (0 padded Week of Year, 1st day of week = Sunday, NB: 1st week of year starts from the last Sunday of last year) 一年的第幾周, 一周的開始為周日,第一周從去年的最後一個周日起算
W: 1~5 (0 padded Week of Month, 1st day of week = Sunday) 一個月的第幾周
y/yyyy: (Full Year) 完整的年份
yy/yyy: (2 Digits Year) 2個數字的年份
Y/YYYY: (Full Year, starting from the Sunday of the 1st week of year) 這個年份未知幹嘛用的
YY/YYY: (2 Digits Year, starting from the Sunday of the 1st week of year) 這個年份未知幹嘛用的
z~zzz: (Specific GMT Timezone Abbreviation) 指定GMT時區的編寫
zzzz: (Specific GMT Timezone Name) Z: +0000 (RFC 822 Timezone) 指定GMT時區的名稱
NSString lastModifiedString = @"Mon, 06 Jun 2011 12:47:05 GMT";
NSDateFormatter *df = [[NSDateFormatter
Alloc] init];
//df.dateFormat = @"EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'";
df.dateFormat = @"EEE, dd MMM yyyy HH:mm:ss z";
df.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease];
df.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
NSDate date = [df dateFromString:lastModifiedString];