calmonths
Calendar duration in months
Syntax
Description
The calmonths function returns an array that represents
calendar months. When you use arrays that have the calendarDuration
data type in calendar calculations, the calculations take into account leap years,
Daylight Saving Time shifts, and the differing lengths of calendar months. For
calculations that involve fixed lengths of time, use the duration data type.
M = calmonths( returns
an array representing calendar months equivalent to the values in X)X.
If
Xis a numeric array, thenMis acalendarDurationarray with each element equal to the number of calendar months in the corresponding element ofX.If
Xis acalendarDurationarray, thenMis adoublearray with each element equal to the number of whole calendar months in the corresponding element ofX.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2014b