doubledate.sos#

doubledate.sos(date: date, offset: int = 0) date#

Returns the first date of the calendar semester, i.e. one of 1 January or 1 July, then optionally offsets it by offset semesters.

Parameters:
  • date (datetime.date) – the date from which to compute the start of the semester

  • offset (int, optional) – an offset from the start of the semester of the date

Returns:

The start of the semester

Return type:

datetime.date