EN
JavaScript - English month names
4 points
This article was created to speed up software developer programming by providing JavaScript arrays with month names.
Quick solution:
xxxxxxxxxx
1
const MONTH_FULL_NAMES = [
2
'January',
3
'February',
4
'March',
5
'April',
6
'May',
7
'June',
8
'July',
9
'August',
10
'September',
11
'October',
12
'November',
13
'December'
14
];
Inline:
xxxxxxxxxx
1
const MONTH_FULL_NAMES = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
Abbreviations:
xxxxxxxxxx
1
const MONTH_SHORT_NAMES = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
In this section, you can see other ways to name months with number of days.
xxxxxxxxxx
1
-----------------------------------------------------------------------------
2
| [ month name ] | |
3
|------------------------------------| [ number of days ] |
4
| [ full name ] [ abbreviation ] | |
5
|------------------------------------|--------------------------------------|
6
| | |
7
| January Jan. | 31 days |
8
| February Feb. | 28 days (29 days in leap years) | https://dirask.com/posts/JavaScript-check-if-specific-year-is-leap-przo3p
9
| March Mar. | 31 days |
10
| April Apr. | 30 days |
11
| May May. | 31 days |
12
| June Jun. | 30 days |
13
| July Jul. | 31 days |
14
| August Aug. | 31 days |
15
| September Sep. | 30 days |
16
| October Oct. | 31 days |
17
| November Nov. | 30 days |
18
| December Dec. | 31 days |
19
| | |
20
-----------------------------------------------------------------------------
Abbreviations (with dots):
xxxxxxxxxx
1
const MONTH_SHORT_NAMES = ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'];