calquarters
Calendar duration in quarters
Syntax
Description
The calquarters
function returns an array that represents
calendar quarters. When you use arrays that have the calendarDuration
data type in calendar calculations, the calculations take into account leap years,
Daylight Saving Time shifts, and the differing lengths of calendar months. For
calculations that involve fixed lengths of time, use the duration
data type.
Q = calquarters(
returns
an array representing calendar quarters equivalent to the values in
array X
)X
.
If
X
is a numeric array, thenQ
is acalendarDuration
array with each element equal to the number of calendar quarters in the corresponding element ofX
.If
X
is acalendarDuration
array, thenQ
is adouble
array with each element equal to the number of whole calendar quarters in the corresponding element ofX
.Q = fix(calmonths(t)/3)
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2014b