Period length in days, from dates
Arguments
- from
Start of the period: a
Date, or anythingas.Date()accepts.- to
End of the period, inclusive.
Details
Inclusive of both ends, because a period running from the 1st to the 31st is thirty-one days of exposure, not thirty. Leap years need no special handling: the arithmetic is on dates, so 2024 comes out at 366 and 2023 at 365 without anyone choosing.