zcollection.merging.period.PeriodRelation#

class zcollection.merging.period.PeriodRelation(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: IntEnum

Enumeration of the relations which can exist between two periods.

Attributes

AFTER

The first period is after.

START_TOUCHING

The first period is after, but the start date of the first period is the same date as the end date of the second period.

START_INSIDE

The start date of the first period is inside the second period.

INSIDE_START_TOUCHING

The start date of the first period is same as the first date of the second period and the end date is inside the first period.

ENCLOSING_START_TOUCHING

The first period is inside the second period and the start date of the two periods are the same.

ENCLOSING

The second period is inside the first period.

ENCLOSING_END_TOUCHING

The second period is inside the first period and the end date of the two periods are the same.

EXACT_MATCH

The two periods are exactly the same.

INSIDE

The first period is inside the second period.

INSIDE_END_TOUCHING

The first period is inside the second period and the end date of the two periods are the same.

END_INSIDE

The end date of the first period is inside the second period.

END_TOUCHING

The end date of the first period is same as the start date of the second period.

BEFORE

The first period is before the second period.

denominator

the denominator of a rational number in lowest terms

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Public Methods

is_after()

Return true if the relation is after.

is_before()

Return true if the relation is before.

contains()

Return true if one period enclosing the other period.

is_before_overlapping()

Return true if one period is before but there is an overlap between the two periods.

is_after_overlapping()

Return true if one period is after but there is an overlap between the two periods.

is_inside()

Return true if one period is inside the other period.

Special Methods

__format__(format_spec, /)

Convert to a string according to format_spec.

__new__(value)

Inherited Methods

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

bit_count()

Number of ones in the binary representation of the absolute value of self.

bit_length()

Number of bits necessary to represent self in binary.

conjugate

Returns self, the complex conjugate of any int.

from_bytes([byteorder, signed])

Return the integer represented by the given array of bytes.

is_integer()

Returns True.

to_bytes([length, byteorder, signed])

Return an array of bytes representing an integer.