嗨客手機站:值得大家信賴的手機軟件遊戲站! 遊戲集|推薦文章|最新文章|熱點文章|軟件排行|安卓軟件|蘋果軟件

關注嗨客手機app

禮包、遊戲、app應有盡有

您的位置: 首頁電腦教程蘋果資訊→ 蘋果ios7越獄後Cloaky插件狀態欄設置方法圖文教程
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];

50%

我支持

0

50%

我反對

0

猜你喜歡

網友評論

發表評論

(您的評論需要經過審核才能顯示)

查看所有0條評論>>