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
Xis a numeric array, thenWis acalendarDurationarray with each element equal to the number of calendar weeks in the corresponding element ofX.If
Xis acalendarDurationarray, thencalweeksreturns the number of whole weeks equivalent to each calendar duration inX.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2014b