caldays
create a calendarDuration in days
calmonths
create a calendarDuration in months
calyears
create a calendarDuration in years
Syntax
c = caldays(x) c = calmonths(x) c = calyears(x)
Arguments
- x
real scalar or matrix
- c
calendarDuration object
Description
c = caldays(x) creates a calendarDuration in days of the same size as the input argument x.
If x is a calendarDuration, then caldays(x) returns a matrix of reals.
It is the same for the other functions.
Examples
// calendarDuration in days c = caldays(1:31) c = caldays([1; 5; 8; 11; 17]) // calendarDuration in months c = calmonths(1:12) c = calmonths([6 7; 11 12]) // calendarDuration in years c = calyears(2000:4:2030) c = calyears([1985 1987;2014 2018]) c1 = calendarDuration(2000, 1, 1, 12, 30, 00) c2 = calyears(2000) + calmonths(1) + caldays(1) + hours(12) + minutes(30) c1 == c2
See also
- calendarDuration — create a calendarDuration - duration in days, months and years
- duration — create a duration - duration in hours, minutes and seconds
- datetime — create points in time
Report an issue | ||
<< Time and Date | Time and Date | calendar >> |