Xcode时间格式
来源:互联网 发布:中国程序员排名 编辑:程序博客网 时间:2024/05/16 04:32
时间设置的格式
-(NSString *)getDate{ NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy-MM-dd EEEE HH:mm:ss a"]; NSString *locationString=[formatter stringFromDate: [NSDate date]]; [formatter release]; return locationString;} //大写的H日期格式将默认为24小时制,小写的h日期格式将默认为12小时//不需要特别设置,只需要在dataFormat里设置类似"yyyy-MMM-dd"这样的格式就可以了//日期格式如下://y 年 Year 1996; 96//M 年中的月份 Month July; Jul; 07//w 年中的周数 Number 27//W 月份中的周数 Number 2//D 年中的天数 Number 189//d 月份中的天数 Number 10//F 月份中的星期 Number 2//E 星期中的天数 Text Tuesday; Tue//a Am/pm 标记 Text PM//H 一天中的小时数(0-23) Number 0//k 一天中的小时数(1-24) Number 24//K am/pm 中的小时数(0-11) Number 0//h am/pm 中的小时数(1-12) Number 12//m 小时中的分钟数 Number 30//s 分钟中的秒数 Number 55//S 毫秒数 Number 978//z 时区 General time zone Pacific Standard Time; PST; GMT-08:00//Z 时区 RFC 822 time zone -0800
- Xcode时间格式
- xcode格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 时间格式
- 社区发现(Community Detection)算法
- TCP选项之SO_LINGER
- 视频直播
- C++到底还能做什么?
- 正则表达式
- Xcode时间格式
- Hyper-V 安装 Redhat Linux 6.3 虚拟机的网络设置
- ucgui的背景颜色
- 绘图基础--画笔
- 以房养老:请不要逼我交养老保金好吧?
- Unity3D 碰撞关系表
- 我的第一天
- C++ AMP: Analyzing C++ AMP Code with the Concurrency Visualizer
- NSDate常用代码范例