akkudoktoreos.utils.datetimeutil.DatetimesComparisonResult

class akkudoktoreos.utils.datetimeutil.DatetimesComparisonResult(equal: bool, same_instant: bool, time_diff: float, timezone_diff: bool, dst_diff: bool, approximately_equal: bool)

Bases: object

Encapsulates the result of comparing two Pendulum DateTime objects.

equal

Indicates whether the two datetimes are exactly equal (including timezone and DST state).

Type:

bool

same_instant

Indicates whether the two datetimes represent the same point in time, regardless of their timezones.

Type:

bool

time_diff

The time difference between the two datetimes in seconds.

Type:

float

timezone_diff

Indicates whether the timezones of the two datetimes are different.

Type:

bool

dst_diff

Indicates whether the two datetimes differ in their DST states.

Type:

bool

approximately_equal

Indicates whether the time difference between the two datetimes is within the specified tolerance.

Type:

bool

ge

True if dt1 is greater than or equal to dt2.

Type:

bool

gt

True if dt1 is strictly greater than dt2.

Type:

bool

le

True if dt1 is less than or equal to dt2.

Type:

bool

lt

True if dt1 is strictly less than dt2.

Type:

bool

__init__(equal: bool, same_instant: bool, time_diff: float, timezone_diff: bool, dst_diff: bool, approximately_equal: bool)

Methods

__init__(equal, same_instant, time_diff, ...)

Attributes

ge

True if dt1 >= dt2.

gt

True if dt1 > dt2.

le

True if dt1 <= dt2.

lt

True if dt1 < dt2.

__init__(equal: bool, same_instant: bool, time_diff: float, timezone_diff: bool, dst_diff: bool, approximately_equal: bool)
property ge: bool

True if dt1 >= dt2.

Type:

Greater than or equal

property gt: bool

True if dt1 > dt2.

Type:

Strictly greater than

property le: bool

True if dt1 <= dt2.

Type:

Less than or equal

property lt: bool

True if dt1 < dt2.

Type:

Strictly less than