calmonths
datatypes: calD = calmonths (X)
Calendar duration in months.
calD = calmonths (X) returns a calendarDuration
array representing calendar months equivalent to the values in X, which
must be a numeric array of integer values.
calmonths is also available as a method for calendarDuration
arrays, in which case it performs the opposite conversion.
See also: calendarDuration, calyears, calquarters, calweeks, caldays, calendarDuration.calmonths
Source Code: calmonths
calmonths builds a calendar duration of whole months. Twelve or more months normalise into years on display.
calmonths (5)
ans = calendarDuration 5mo
calmonths (14)
ans = calendarDuration 1y 2mo