FUNCTION REFERENCE

caldays

Create calendar days or extract calendar days.

Create calendar days or extract calendar days.

Syntax

cd = caldays(n)

Syntax

n = caldays(cd)

Integer numeric input creates calendar durations in days. Calendar duration input extracts its day component. Calendar months are never converted to an assumed number of days.

Example

datetime(2024,2,28) + caldays(2)

Differences from MATLAB: Bounded two-dimensional arrays; constructor input must contain integers. Only unzoned and UTC datetimes are supported, without daylight saving transitions.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.