E = eomday(Y,M) returns
the last day of the specified month M in the year Y.
The output E is a numeric array. The last day of any month is an integer
between 28 and 31, inclusive.
Example: E = eomday(2020,12) specifies 2020 as the year
number.
Example: E = eomday(2000:2020,12) specifies an array of year
numbers.
M — Month number integer array
Month number, specified as an integer array where each element is an integer between
1 and 12, inclusive. The month numbers correspond to the months listed in the
table.
Month Number
Month Name
1
January
2
February
3
March
4
April
5
May
6
June
7
July
8
August
9
September
10
October
11
November
12
December
Example: E = eomday(2020,12) specifies 12 as the month
number.
Example: E = eomday(2020,1:6) specifies an array of month
numbers.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.