Subgroup: Date
Class: QgsDateRange¶
-
class
qgis.core.
QgsDateRange
¶ Bases:
sip.wrapper
A template based class for storing temporal ranges (beginning to end values).
QgsTemporalRange classes represent a range of values of some temporal type. For instance, ranges of QDateTime might be used to represent datetime ranges.
Ranges can indicate whether the upper and lower values are inclusive or exclusive. The inclusivity or exclusivity of bounds is considered when determining things like whether ranges overlap or during calculation of range intersections.
New in version 3.0.
See also
Note
not available in Python bindings (but class provided for template-based inheritance)Methods
begin
Returns the beginning of the range. contains
Returns true if this range contains another range. end
Returns the upper bound of the range. includeBeginning
Returns true if the beginning is inclusive, or false if the beginning is exclusive. includeEnd
Returns true if the end is inclusive, or false if the end is exclusive. isEmpty
Returns true if the range is empty, ie the beginning equals (or exceeds) the end and either of the bounds are exclusive. isInfinite
Returns true if the range consists of all possible values. isInstant
Returns true if the range consists only of a single instant. overlaps
Returns true if this range overlaps another range. Attributes
-
begin
(self) → QDate¶ Returns the beginning of the range.
See also
See also
-
contains
(self, other: QgsDateRange) → bool¶ Returns true if this range contains another range.
contains(self, element: Union[QDate, datetime.date]) -> bool Returns true if this range contains a specified
element
.
-
end
(self) → QDate¶ Returns the upper bound of the range.
See also
See also
-
includeBeginning
(self) → bool¶ Returns true if the beginning is inclusive, or false if the beginning is exclusive.
See also
See also
-
includeEnd
(self) → bool¶ Returns true if the end is inclusive, or false if the end is exclusive.
See also
See also
-
isEmpty
(self) → bool¶ Returns true if the range is empty, ie the beginning equals (or exceeds) the end and either of the bounds are exclusive. A range with both invalid beginning and end is considered infinite and not empty.
-
isInfinite
(self) → bool¶ Returns true if the range consists of all possible values.
See also
See also
-
isInstant
(self) → bool¶ Returns true if the range consists only of a single instant.
See also
See also
-
overlaps
(self, other: QgsDateRange) → bool¶ Returns true if this range overlaps another range.
-