File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -420,7 +420,9 @@ def duration(self) -> Timedelta:
420420 """What is the duration of this date?
421421 Calculate based on earliest and latest date within range,
422422 taking into account the precision of the date even if not all
423- parts of the date are known."""
423+ parts of the date are known. Note that durations are inclusive
424+ (i.e., a closed interval) and include both the earliest and latest
425+ date rather than the difference between them."""
424426
425427 # if precision is a single day, duration is one day
426428 # no matter when it is or what else is known
@@ -541,6 +543,9 @@ def __eq__(self, other) -> bool:
541543
542544 def duration (self ) -> Timedelta :
543545 """Calculate the duration between two undates.
546+ Note that durations are inclusive (i.e., a closed interval), and
547+ include both the earliest and latest date rather than the difference
548+ between them.
544549
545550 :returns: A duration
546551 :rtype: Timedelta
You can’t perform that action at this time.
0 commit comments