m = months(t1, t2)
| Parameter | Description |
|---|---|
| inputs | Two datetime or date-compatible inputs with matching sizes or scalar expansion. |
| Parameter | Description |
|---|---|
| output | A double array of whole month counts. |
Return whole calendar months between two dates.
The result counts completed calendar months and adjusts when the second day-of-month is before the first.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
months(datetime(2024, 1, 31), datetime(2024, 3, 30))
| Version | Description |
|---|---|
| 2.0.0 | initial version |