Duration & Calendar Duration. What is the difference?
이전 댓글 표시
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
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Calendar에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!