Skip to content

Calendar

Qt Base Class: QCalendar

Signature: QCalendar(self) -> None QCalendar(self, QCalendar: PySide6.QtCore.QCalendar) -> None QCalendar(self, id: PySide6.QtCore.QCalendar.SystemId) -> None QCalendar(self, name: str) -> None QCalendar(self, system: PySide6.QtCore.QCalendar.System) -> None

Base classes

Name Children Inherits
QCalendar
PySide6.QtCore
QCalendar(self) -> None

⋔ Inheritance diagram

graph TD
  1473299844304["core.Calendar"]
  1473289000352["QtCore.QCalendar"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473289000352 --> 1473299844304
  1473291690208 --> 1473289000352
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QCalendar

Describes calendar systems.

Source code in prettyqt\core\_calendar.py
class Calendar(core.QCalendar):
    """Describes calendar systems."""

    def __init__(self, system: str | core.QCalendar.System = "gregorian"):
        typ = system if isinstance(system, core.QCalendar.System) else SYSTEM[system]
        super().__init__(typ)

    def __repr__(self):
        return get_repr(self, self.name())

    def __reduce__(self):
        return type(self), (self.name(),)

    # def __bool__(self):
    #     return self.isValid()

    def get_date_from_parts(self, year: int, month: int, day: int) -> core.Date:
        return core.Date(self.dateFromParts(year, month, day))