c = calmonths(x)
| Parameter | Description |
|---|---|
| inputs | Numeric month counts. |
| Parameter | Description |
|---|---|
| output | A calendarDuration array with month components. |
Create calendar durations containing calendar months.
Month arithmetic handles variable month lengths and clamps to the end of the destination month when necessary.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
datetime(2024, 1, 31) + calmonths(1)
| Version | Description |
|---|---|
| 2.0.0 | initial version |