zcollection.merging.period.Period.is_adjacent#

Period.is_adjacent(other)[source]#

True if periods are next to each other without a gap.

In the example below, p1 and p2 are adjacent, but p3 is not adjacent with either of p1 or p2.

[-p1-[
     [-p2-]
       [-p3-]
Parameters:

other (Period) – The other period to check.

Returns:

  • True if other is a date and is adjacent to this period

  • True if other is a period and is adjacent to this period

Return type:

bool