calweeks
Calendar weeks, each equal to seven calendar days.
Category: Language Fundamentals > Data Types
Syntax
d = calweeks(n)
Creates a calendarDuration of n weeks.
Description
calweeks(n) equals caldays(7*n), so it is shown as a number of days. Unlike days(7*n), it follows the calendar through daylight-saving changes.
Input arguments
n- Numeric array of week counts.
Output arguments
d- calendarDuration array, same size as
n.
Example
One week later
calweeks(2)
datetime(2024,3,1) + calweeks(1)
Output
ans = calendarDuration
14d
ans = datetime
08-Mar-2024