When supplying a custom date format, a string of tokens that are entered will be replaced with their actual current date values when displayed. For example, entering "MMMM D" will display a date such as "September 7". Use the following table to find the individual available date format tokens:
Token Type | Token | Display Examples |
Month | M | 1 2 ... 11 12 |
MM | 01 02 ... 11 12 | |
MMM | Jan Feb ... Nov Dec | |
MMMM | January February ... November December | |
Quarter | Q | 1 2 3 4 |
Day of Month | D | 1 2 ... 30 31 |
DD | 01 02 ... 30 31 | |
Day of Year | DDD | 1 2 ... 364 365 |
DDD | 001 002 ... 364 365 | |
Day of Week | d | 0 1 ... 5 6 |
dd | Su Mo ... Fr Sa | |
ddd | Sun Mon ... Fri Sat | |
dddd | Sunday Monday ... Friday Saturday | |
Day of Week (ISO) | E | 1 2 ... 6 7 |
Week of Year | w | 1 2 ... 52 53 |
ww | 01 02 ... 52 53 | |
Year | YY | 70 71 ... 29 30 |
YYYY | 1970 1972 ... 2029 2030 |
Some other additional characters may be entered for separation, such as spaces, commas, periods, dashes, and slashes. To enter other text that will always display, surround the string in square brackets, such as "[Hello! Today is ]".
For additional formatting tokens beyond these, review the table under the "Display" section provided at the Moment.js site, here: https://momentjs.com/docs/#/displaying/format/