Returns the difference between two Date objects as an Interval. :param dt: The date to compare to (defaults to today) :param abs: Whether to return an absolute interval or not
(self, dt: date | None = None, abs: bool = True)
| 279 | # DIFFERENCES |
| 280 | |
| 281 | def diff(self, dt: date | None = None, abs: bool = True) -> Interval[Date]: |
| 282 | """ |
| 283 | Returns the difference between two Date objects as an Interval. |
| 284 | |
| 285 | :param dt: The date to compare to (defaults to today) |
| 286 | :param abs: Whether to return an absolute interval or not |
| 287 | """ |
| 288 | if dt is None: |
| 289 | dt = self.today() |
| 290 | |
| 291 | return Interval(self, Date(dt.year, dt.month, dt.day), absolute=abs) |
| 292 | |
| 293 | def diff_for_humans( |
| 294 | self, |