@@ -8,33 +8,40 @@ Get the formatted date according to the string of tokens passed in, inspired by
8
8
9
9
** List of all available formats (HH:mm: ss by default):**
10
10
11
- | Format | Output | Description |
12
- | --------| ---------------- | ---------------------------------------|
13
- | ` YY ` | 18 | Two-digit year |
14
- | ` YYYY ` | 2018 | Four-digit year |
15
- | ` M ` | 1-12 | The month, beginning at 1 |
16
- | ` MM ` | 01-12 | The month, 2-digits |
17
- | ` MMM ` | Jan-Dec | The abbreviated month name |
18
- | ` MMMM ` | January-December | The full month name |
19
- | ` D ` | 1-31 | The day of the month |
20
- | ` DD ` | 01-31 | The day of the month, 2-digits |
21
- | ` H ` | 0-23 | The hour |
22
- | ` HH ` | 00-23 | The hour, 2-digits |
23
- | ` h ` | 1-12 | The hour, 12-hour clock |
24
- | ` hh ` | 01-12 | The hour, 12-hour clock, 2-digits |
25
- | ` m ` | 0-59 | The minute |
26
- | ` mm ` | 00-59 | The minute, 2-digits |
27
- | ` s ` | 0-59 | The second |
28
- | ` ss ` | 00-59 | The second, 2-digits |
29
- | ` SSS ` | 000-999 | The millisecond, 3-digits |
30
- | ` A ` | AM PM | The meridiem |
31
- | ` AA ` | A.M. P.M. | The meridiem, periods |
32
- | ` a ` | am pm | The meridiem, lowercase |
33
- | ` aa ` | a.m. p.m. | The meridiem, lowercase and periods |
34
- | ` d ` | 0-6 | The day of the week, with Sunday as 0 |
35
- | ` dd ` | S-S | The min name of the day of the week |
36
- | ` ddd ` | Sun-Sat | The short name of the day of the week |
37
- | ` dddd ` | Sunday-Saturday | The name of the day of the week |
11
+ | Format | Output | Description |
12
+ | --------| ------------------------ | -----------------------------------------|
13
+ | ` Yo ` | 2018th | Ordinal formatted year |
14
+ | ` YY ` | 18 | Two-digit year |
15
+ | ` YYYY ` | 2018 | Four-digit year |
16
+ | ` M ` | 1-12 | The month, beginning at 1 |
17
+ | ` Mo ` | 1st, 2nd, ..., 12th | The month, ordinal formatted |
18
+ | ` MM ` | 01-12 | The month, 2-digits |
19
+ | ` MMM ` | Jan-Dec | The abbreviated month name |
20
+ | ` MMMM ` | January-December
8000
| The full month name |
21
+ | ` D ` | 1-31 | The day of the month |
22
+ | ` Do ` | 1st, 2nd, ..., 31st | The day of the month, ordinal formatted |
23
+ | ` DD ` | 01-31 | The day of the month, 2-digits |
24
+ | ` H ` | 0-23 | The hour |
25
+ | ` Ho ` | 0th, 1st, 2nd, ..., 23rd | The hour, ordinal formatted |
26
+ | ` HH ` | 00-23 | The hour, 2-digits |
27
+ | ` h ` | 1-12 | The hour, 12-hour clock |
28
+ | ` ho ` | 1st, 2nd, ..., 12th | The hour, 12-hour clock, sorted |
29
+ | ` hh ` | 01-12 | The hour, 12-hour clock, 2-digits |
30
+ | ` m ` | 0-59 | The minute |
31
+ | ` mo ` | 0th, 1st, ..., 59th | The minute, ordinal formatted |
32
+ | ` mm ` | 00-59 | The minute, 2-digits |
33
+ | ` s ` | 0-59 | The second |
34
+ | ` so ` | 0th, 1st, ..., 59th | The second, ordinal formatted |
35
+ | ` ss ` | 00-59 | The second, 2-digits |
36
+ | ` SSS ` | 000-999 | The millisecond, 3-digits |
37
+ | ` A ` | AM PM | The meridiem |
38
+ | ` AA ` | A.M. P.M. | The meridiem, periods |
39
+ | ` a ` | am pm | The meridiem, lowercase |
40
+ | ` aa ` | a.m. p.m. | The meridiem, lowercase and periods |
41
+ | ` d ` | 0-6 | The day of the week, with Sunday as 0 |
42
+ | ` dd ` | S-S | The min name of the day of the week |
43
+ | ` ddd ` | Sun-Sat | The short name of the day of the week |
44
+ | ` dddd ` | Sunday-Saturday | The name of the day of the week |
38
45
39
46
- Meridiem is customizable by defining ` customMeridiem ` in ` options ` .
40
47
0 commit comments