格式化新浪微博日期成NSDate
来源:互联网 发布:php个人网站模板 编辑:程序博客网 时间:2024/05/16 04:39
- (NSDate *)dateFromString:(NSString *)string {
//Wed Mar 14 16:40:08 +0800 2012
if (!string) return nil;
struct tm tm;
time_t t;
string=[string substringFromIndex:4];
strptime([string cStringUsingEncoding:NSUTF8StringEncoding], "%b %d %H:%M:%S %z %Y", &tm);
tm.tm_isdst = -1;
t = mktime(&tm);
return [NSDate dateWithTimeIntervalSince1970:t];
}
- 格式化新浪微博日期成NSDate
- NSDate格式化日期对象
- NSDate格式化日期
- 关于新浪微博API返回的日期格式化字符串
- IOS 日期格式化 新浪微博返回字符串
- 关于新浪微博API返回的日期格式化字符串
- NSDate分类-日期格式化以及日期常用判断
- Nsdate 格式化
- NSDate 格式化
- NSDate --- 日期
- NSDate日期
- NSDate 格式化 NSDate to NSString
- OC基础使用(十 NSDate 时间日期 及 NSDateFormatter 日期格式化类)
- 日期类NSDate与日期格式化类NSDateFormatter类的使用
- NSDate 格式化含有毫秒
- ios--NSDate格式化(随笔)
- NSDate格式化输出
- NSDate格式化字符
- C语言中的数组指针与指针数组
- 深入.NET DataTable
- 托盘
- FPGA_TPMS_10_9
- HDU 3686
- 格式化新浪微博日期成NSDate
- String[] books={ "thinking in java ",return books;
- while相关知识点
- 用MySQL创建数据库和数据库表
- Sql Server
- FPGA_TPMS_10_10
- JVM垃圾收集【一】
- 不同服务器数据库之间的数据操作
- poj 1502 MPI Maelstrom