嗨客手机站:值得大家信赖的手机软件游戏站! 游戏集 | 推荐文章 | 最新文章 | 热点文章 | 软件排行 | 安卓软件 | 苹果软件

关注嗨客手机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条评论>>