FUNCTION REFERENCE

calyears

Create calendar years or extract whole calendar years.

Create calendar years or extract whole calendar years.

Syntax

cd = calyears(n)

Syntax

n = calyears(cd)

Integer numeric input creates calendar durations. Calendar duration input extracts the normalized whole years.

Example

datetime(2024,2,29) + calyears(1)

Differences from MATLAB: Bounded two-dimensional arrays; constructor input must contain integers.

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