f.Date().format()
f.Date(DateString, FormatString).format(formatToken)
Last updated
f.Date(DateString, FormatString).format(formatToken)
Last updated
formatToken
필수
String
Tokens 항목만 사용가능
반환받을 날짜 형식을 지정합니다.
YYYY
4 digit year
2014
YY
2 digit year
14
Y
Year with any number of digits and sign
-25
Q
Quarter of year. Sets month to first month in quarter.
1..4
M MM
Month number
1..12
MMM MMMM
Month name in locale set by moment.locale()
Jan..December
D DD
Day of month
1..31
Do
Day of month with ordinal
1st..31st
DDD DDDD
Day of year
1..365
ddd dddd
Day name in locale set by moment.locale()
Mon...Sunday
H HH
Hours (24 hour time)
0..23
h hh
Hours (12 hour time used with a A
.)
1..12
k kk
Hours (24 hour time from 1 to 24)
1..24
a A
Post or ante meridiem (Note the one character a p
are also considered valid)
am pm
m mm
Minutes
0..59
Z ZZ
Time zone
+09:00
S SS SSS ... SSSSSSSSS
Fractional seconds
0..999999999
s ss
Offset from UTC as +-HH:mm
, +-HHmm
, or Z
+12:00