doubledate.eot#
- doubledate.eot(date: date, offset: int = 0) date #
Returns the end of the calendar trimester, i.e. one of 30 April, 31 August or 31 December, then optionally offsets it by
offset
trimesters.- Parameters:
date (datetime.date) – the date from which to compute the end of the trimester
offset (int, optional) – an offset from the end of the trimester of the date
- Returns:
The end of the trimester
- Return type:
datetime.date
Examples
>>> today = datetime.date(2020, 1, 15) >>> eot(today): datetime.date(2020,4,30)
>>> eot(today, 1) datetime.date(2020,8,31)