Duration & Calendar Duration. What is the difference?
Mostrar comentarios más antiguos
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 comentario
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Calendar en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!