calquarters

Calendar quarters, each equal to three calendar months.

Category: Language Fundamentals > Data Types

Syntax

d = calquarters(n)

Creates a calendarDuration of n quarters.

Description

calquarters(n) is the same as calmonths(3*n), and it is displayed in months. It is useful when stepping through financial or academic periods.

Input arguments

n
Numeric array of quarter counts.

Output arguments

d
calendarDuration array, same size as n.

Example

Two quarters later

calquarters(1)
datetime(2024,1,1) + calquarters(2)
Output
ans = calendarDuration
   3mo
ans = datetime
   01-Jul-2024

See also

calmonths calyears calweeks calendarDuration