Duration & Calendar Duration. What is the difference?
Ältere Kommentare anzeigen
Still, I can't understand the difference.
Piece of code which exemplifies my doubt:

I added exactly 1 year to t0, using years and calyears, and I get different answers.
1 Kommentar
From the duration documentation: "..fixed-length (365.2425-day long) years."
From the calendar duration documentation: "..elapsed time in calendar units of variable length. For example, the number of days in 1 month depend on the particular month of the year. Calculations with calendar durations account for daylight saving time changes and leap years"
So duration has a fixed year length, and calendar duration the year length changes with leap years, etc.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Calendar finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!