QCalendar Class
The QCalendar class describes calendar systems. More...
| Header: | #include <QCalendar> |
| qmake: | QT += core |
| Since: | Qt 5.14 |
This class was introduced in Qt 5.14.
Note: All functions in this class are reentrant.
Public Types
| enum class | System { Gregorian, Julian, Milankovic, Jalali, IslamicCivil } |
Detailed Description
A QCalendar object maps a year, month, and day-number to a specific day (ultimately identified by its Julian day number), using the rules of a particular system.
The default QCalendar() is a proleptic Gregorian calendar, which has no year zero. Other calendars may be supported by enabling suitable features or loading plugins. Calendars supported as features can be constructed by passing the QCalendar::System enumeration to the constructor. All supported calendars may be constructed by name, once they have been constructed. (Thus plugins instantiate their calendar backend to register it.) Built-in backends, accessible via QCalendar::System, are also always available by name.
A QCalendar value is immutable.
Member Type Documentation
enum class QCalendar::System
This enumerated type is used to specify a choice of calendar system.
| Constant | Value | Description |
|---|---|---|
QCalendar::System::Gregorian | 0 | The default calendar, used internationally. |
QCalendar::System::Julian | 8 | An ancient Roman calendar. |
QCalendar::System::Milankovic | 9 | A revised Julian calendar used by some Orthodox churches. |
QCalendar::System::Jalali | 10 | The Solar Hijri calendar (also called Persian). |
QCalendar::System::IslamicCivil | 11 | The (tabular) Islamic Civil calendar. |
See also QCalendar.