Formatting Tokens
Token | Example | Descriptions | Availability (Parse /Format) |
---|---|---|---|
YYYY | 2024 | full year | both |
YY | 24 | 2 digits year | both |
MMMM | June | month name | both |
MMM | Jun | month short name | both |
MM | 03, 09, 10, 11, ... | 2 digits month number | both |
M | 3, 9, 10, 11, ... | month number | both |
DDDD | 09 | 2 digits day of year | format |
DDD | 9 | day of year | format |
DD | 03, 09, 10, 17, ... | 2 digits day of month | both |
D | 3, 9, 10, 17, ... | day of month | both |
WW | 01, 03, 24, 33, ... | 2 digits week of year | format |
W | 1, 3, 24, 33, ... | week of year | format |
dddd | Sunday, Monday, Tuesday, ... | week day name | format |
ddd | Sun, Mon, Tue, ... | week day short name | format |
dd | 01, 02, ..., 07 | 2 digits week day number | format |
d | 1, 2, ..., 7 | week day number | format |
HH | 03, 09, 13, 17, ... | 2 digits hour (24 hour mode) | both |
H | 3, 9, 13, 17, ... | hour (24 hour mode) | both |
hh | 03, 09, 10, 12, ... | 2 digits hour (12 hour mode) | both |
h | 3, 9, 10, 12, ... | hour (12 hour mode) | both |
mm | 03, 09, 10, 17, ... | 2 digits minute | both |
m | 3, 9, 10, 17, ... | minute | both |
ss | 03, 09, 10, 17, ... | 2 digits second | both |
s | 3, 9, 10, 17, ... | second | both |
SSS | 100 | 3 digits millisecond | both |
SS | 10 | 2 digits millisecond | both |
S | 1 | 1 digit millisecond | both |
A | AM | meridiem | both |
a | am | meridiem lowercase | both |