NSDateFormatter中时间格式串的含义
a: AM/PM (上午/下午)
A: 0~86399999 (一天的第A微秒)
c/cc: 1~7 (一周的第一天, 周天为1)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat (星期几简写)
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday (星期几全拼)
dd: 1~31 (月份的第几天, 带0)
D: 1~366 (年份的第几天,带0)
e: 1~7 (一周的第几天, 带0)
E~EEE: Sun/Mon/Tue/Wed/Thu/Fri/Sat (星期几简写)
EEEE: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday (星期几全拼)
F: 1~5 (每月的第几周, 一周的第一天为周一)
g: Julian Day Number (number of days since 4713 BC January 1) 未知
G~GGG: BC/AD (Era Designator Abbreviated) 未知
GGGG: Before Christ/Anno Domini 未知
hh: 1~12 (0 padded Hour (12hr)) 带0的时, 12小时制
HH: 0~23 (0 padded Hour (24hr)) 带0的时, 24小时制
k: 1~24 (0 padded Hour (24hr) 带0的时, 24小时制
K: 0~11 (0 padded Hour (12hr)) 带0的时, 12小时制
L/LL: 1~12 (0 padded Month) 第几月
LLL: Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec 月份简写
LLLL: January/February/March/April/May/June/July/August/September/October/November/December 月份全称
m: 0~59 (0 padded Minute) 分钟
M/MM: 1~12 (0 padded Month) 第几月
MMM: Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec
MMMM: January/February/March/April/May/June/July/August/September/October/November/December
q/qq: 1~4 (0 padded Quarter) 第几季度
qqq: Q1/Q2/Q3/Q4 季度简写
qqqq: 1st quarter/2nd quarter/3rd quarter/4th quarter 季度全拼
Q/QQ: 1~4 (0 padded Quarter) 同小写
QQQ: Q1/Q2/Q3/Q4 同小写
QQQQ: 1st quarter/2nd quarter/3rd quarter/4th quarter 同小写
ss: 0~59 (0 padded Second) 秒数
S: (rounded Sub-Second) 未知
u: (0 padded Year) 未知
v~vvv: (General GMT Timezone Abbreviation) 常规GMT时区的编写
vvvv: (General GMT Timezone Name) 常规GMT时区的名称
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时区的名称
如:[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss”];
那么输出的:2015-02-06 20:07:04
NSDateFormatter中时间格式串的含义的更多相关文章
- 解决IIS7、IIS7.5中时间格式显示的问题
今天在用IIS7的时候发现一个关于时间格式的问题,当我在ASP中使用now()时间函数的时候,日期是以"/"来分隔,而不是以"-"来分隔的,使得我在运行程序的时 ...
- 修改springfox-swagger源码,使example中时间格式默认为“yyyy-MM-dd HH:mm:ss”
修改swagger源码,使example中时间格式默认为"yyyy-MM-dd HH:mm:ss" 前言 简单点说,在swagger中,怎么能针对以下vo中的java.util.D ...
- oracle中时间格式时候的大于号是大于和等于的意思
oracle中时间格式时候的大于号是大于和等于的意思
- 如何解决前端传来的时间格式与mysql表中时间格式不匹配的查询问题
前端传过来的时间格式为“2016-07-11 11:13:10”,而数据表中对应字段`add_time`的格式为“2016-7-11”,此时sql不能直接用 "where `add_time ...
- python中时间格式
问题:通过MySQLdb查询datetime字段,然后通过浏览器显示出来,得到的格式是: 'Thu, 19 Feb 2009 16:00:07 GMT' (http呈现出来的格式) ...
- JAVA中时间格式(SimpleDateFormat)和数字格式(DecimalFormat)转换详解(转)
时间格式转换SimpleDateFormat: //定义日期的格式 SimpleDateFormat format =new SimpleDateFormat("yyMMdd"); ...
- Spring中时间格式注解@DateTimeFormat
在SpringMVC中Controller中方法参数为Date类型想要限定请求传入时间格式时,可以通过@DateTimeFormat来指定,但请求传入参数与指定格式不符时,会返回400错误. 如果在B ...
- elasticsearch时间格式DateFormat的含义
时间格式 枚举(或者英文)format pattern 含义 custom - 自定义属性 none - 不转化 basic_date yyyyMMdd 基本时间 basic_date_time ...
- Java中时间格式处理,指定N天/小时等之后的时间
1)根据当前时间,获取具体的时刻的时间 N天前 M小时之前 可用 new Date().getTime() - 24 * 60 * 60 * 1000*N[N天之前]的方法来获取处理时间之后的具体的值 ...
随机推荐
- redis命令(转)
http://redis.readthedocs.org/en/latest/index.html 连接操作相关的命令 quit:关闭连接(connection) auth:简单密码认证 持久化 sa ...
- 03.product.js
/* item.jd.com Compressed by uglify Author:keelii Date: 2014-08-05 6:52:26 [PM] */ function insertSc ...
- 安装程序无法复制文件 convlog.exe的解决方法
在安装的时候出现一个错误提示“安装程序无法复制文件CONVLOG.EX_”,上网找了很多资料,都说是因为版本问题,考虑到自己的服务器安装的是2003 SP1,后来打了补丁到SP2的,也就认为是版本问题 ...
- [Flex] ButtonBar系列——简单布局
<?xml version="1.0" encoding="utf-8"?> <!--通过layout属性,设置ButtonBar布局--&g ...
- HTTP权威指南一
HTTP——因 特网的多媒体信使 每天, 都有数以亿万计的 JPEG 图片. HTML 页面. 文本文件. MPEG 电影. WAV音频文件. Java 小程序和其他资源在因 特网 上游弋. HTTP ...
- [SQL] 不合并重复数据 union all
select * from A union select * from B --不合并重复行 select * from A union all select * from B --如果要对字段进行排 ...
- [SQL]把同一字段里的多行数据用一行显示
declare @t table(id int,num int) insert @t , union all , union all , --select * from @t ----查询 decla ...
- LeetCode 67. Add Binary
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = ...
- [ACDream 1430]SETI 后缀数组
题目链接:http://acdream.info/problem?pid=1430 题目大意:给你一个长度不超过10000的字符串,问你出现过两次或两次以上的不重叠的子串有多少个. 后缀数组计算出he ...
- 菜鸟-手把手教你把Acegi应用到实际项目中(7)-缓存用户信息
首先讲讲EhCache.在默认情况下,即在用户未提供自身配置文件ehcache.xml或ehcache-failsafe.xml时,EhCache会依据其自身Jar存档包含的ehcache-fails ...