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
Xis a numeric array, thenDis acalendarDurationarray with each element equal to the number of calendar days in the corresponding element ofX.If
Xis acalendarDurationarray, thenDis adoublearray with each element equal to the number of whole calendar days in the corresponding element ofX.
Examples
Input Arguments
Tips
caldayscreates days that account for Daylight Saving Time shifts when used in calendar calculations. To create exact fixed-length (24 hour) days, use thedaysfunction.
Extended Capabilities
Version History
Introduced in R2014b