Financial Toolbox    
eomdate

Last date of month

Syntax

Description

DayMonth = eomdate(Year, Month) returns the serial date number of the last date of the month for the given year and month. Enter Year as a four-digit integer; enter Month as an integer from 1 to 12.

Either input argument can contain multiple values, but if so, the other input must contain the same number of values or a single value that applies to all. For example, if Year is a 1-by-n vector of integers, then Month must be a 1-by-n vector of integers or a single integer. DayMonth is then a 1-by-n vector of date numbers.

Use the function datestr to convert serial date numbers to formatted date strings.

Examples

See Also

day, eomday, lbusdate, month, year


  effrr eomday