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, rounded towards negative infinity, so that -1 month is -1 quarter.

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

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