calweeks
Calendar duration in weeks
Syntax
Description
The calweeks
function returns an array that represents
calendar weeks. 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.
returns
an array representing calendar weeks equivalent to the values in W
= calweeks(X
)X
.
If
X
is a numeric array, thenW
is acalendarDuration
array with each element equal to the number of calendar weeks in the corresponding element ofX
.If
X
is acalendarDuration
array, thencalweeks
returns the number of whole weeks equivalent to each calendar duration inX
.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2014b