Java日期格式化参数对照表

2018-06-27 09:45:23来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

 

Symbol

Meaning

Presentation

Example

G

era designator

Text

AD

y

year

Number

2009

M

month in year

Text & Number

July & 07

d

day in month

Number

10

h

hour in am/pm (1-12)

Number

12

H

hour in day (0-23)

Number

0

m

minute in hour

Number

30

s

second in minute

Number

55

S

millisecond

Number

978

E

day in week

Text

Tuesday

D

day in year

Number

189

F

day of week in month

Number

2 (2nd Wed in July)

w

week in year

Number

27

W

week in month

Number

2

a

am/pm marker

Text

PM

k

hour in day (1-24)

Number

24

K

hour in am/pm (0-11)

Number

0

z

time zone

Text

Pacific Standard Time

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:springboot2.0动态多数据源切换

下一篇:使用wangEditor和SpringMVC(Maven)进行图片上传