关于NSDateFormat
来源:互联网 发布:上海 数据 恢复 编辑:程序博客网 时间:2024/06/07 11:27
1.关于NSDateFormat属性dateFormat的制定。
The followering is an offical example:
NSDateFormat *dateFormat= [[NSDateFormat alloc] init];
dateFormat.dateFormat = @"yyyy-MM-dd 'at' HH:mm"] ;
NSDate *date = [NSDate date];
NSString *dateStr = [dateFormat stringFormDate:date];
NSLog(@"dateString = %@",dateStr);
//For US English, the output may be: dateString = 2001-01-02 at 13:00
1. It user yyyy to specify the year component. A common mistake is to use YYYY.yyyy speifies the calendar year whereas YYYY specifies the year (of "Week of Year"),used in the ISO year-week calendar. In most cases,yyyy and YYYY yield the same number,however they may be different. Typically you should use the calendar year.
2. The representation of the time may be 13:00. In iOS,however, if the user has switched 14-Hour Time to Off ,the time may be 1:00 pm.
另外,通过实践也可以看到 “HH”指定24小时制,"hh"制定12小时制的
- 关于NSDateFormat
- NSDateFormat
- ios NSDateFormat 格式字符串
- NSDateFormat dateFormat样式
- 自己的笔记 NSDateFormat 将传入数字转为mm:ss 格式
- 关于
- 关于
- 关于++,--
- 关于#
- 关于。。。
- 关于
- 关于......
- 关于
- 关于
- 关于****
- 关于
- 关于!
- 关于++
- database link
- CI项目架构(1)---前后台分离
- 字符串加密
- 机器学习:线性回归 最小二乘法 方差
- 关于android在fragment中调用getActivity()功能进行Toast或者setAdapter时空指针的异常
- 关于NSDateFormat
- 《Storm入门》中文版
- Eclipse安装SVN插件
- iScroll使用总结
- Android自定义统计图(柱状图,折线图,饼状图)
- MVC4+EF新手入门:HtmlHelper
- Android 夜间模式实现
- iOS 监听程序的生命周期
- Android开发中一些常见问题