caldays
Calendar duration in days
Syntax
Description
The caldays
function returns an array that represents
calendar days. 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. To create
exact fixed-length 24-hour days instead, use the days
function.
D = caldays(
returns
an array representing calendar days equivalent to the values in array X
)X
.
If
X
is a numeric array, thenD
is acalendarDuration
array with each element equal to the number of calendar days in the corresponding element ofX
.If
X
is acalendarDuration
array, thenD
is adouble
array with each element equal to the number of whole calendar days in the corresponding element ofX
.
Examples
Input Arguments
Tips
caldays
creates days that account for Daylight Saving Time shifts when used in calendar calculations. To create exact fixed-length (24 hour) days, use thedays
function.
Extended Capabilities
Version History
Introduced in R2014b