diem.asof#

diem.asof(date: date, side: str = 'left') date#

Resolve the diem to the most recent date on or before (after) the given date.

Parameters:
  • date (datetime.date) – the date from which to compute the target date

  • side ('left', 'right') – whether to resolve to the most recent (left) or the first date after (right) the given date

Examples

>>> diem(3, 31).asof(datetime.date(2020, 2, 28))
datetime.date(2019, 3, 31)