Method Reference: calendarDuration.calquarters

calendarDuration: X = calquarters (calD)

Calendar duration in quarters.

X = calquarters (calD) returns a numeric array with the number of quarters as represented in calD.

calquarters is also available as a function, in which case it performs the opposite conversion.

See also: calendarDuration.calyears, calendarDuration.calmonths, calendarDuration.calweeks, calendarDuration.caldays, calquarters

Source Code: calendarDuration

Example: 1

As a calendarDuration method, calquarters returns the year-and-month part of the span as a whole number of quarters.

 d = calendarDuration (2, 3, 40)
d =
  calendarDuration

   2y 3mo 40d
 calquarters (d)
ans = 9