More caveats about durations

Fixes #957
This commit is contained in:
Hadley Wickham 2022-08-09 15:51:15 -05:00
parent 5162de55ea
commit 4c3f5aa604
1 changed files with 4 additions and 1 deletions

View File

@ -409,7 +409,10 @@ dyears(1)
```
Durations always record the time span in seconds.
Larger units are created by converting minutes, hours, days, weeks, and years to seconds at the standard rate (60 seconds in a minute, 60 minutes in an hour, 24 hours in day, 7 days in a week, 365 days in a year).
Larger units are created by converting minutes, hours, days, weeks, and years to seconds: 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day, and 7 days in a week.
Larger time units are more problematic.
A year is uses the "average" number of days in a year, i.e. 365.25.
There's no way to convert a month to a duration, because there's just too much variation.
You can add and multiply durations: