Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.0.0 - Français


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
<< Temps - calendrier date horloge Temps - calendrier date horloge calendar >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Oct 24 14:34:15 CEST 2023