QJalaliCalendar Class

The QJalaliCalendar class provides Jalali (Hijri Shamsi) calendar system implementation. More...

Header: #include <QJalaliCalendar>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 5.14

Reimplemented Public Functions

virtual bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override
virtual int daysInMonth(int month, int year = QCalendar::Unspecified) const override
virtual bool isLeapYear(int year) const override
virtual bool isLunar() const override
virtual bool isLuniSolar() const override
virtual bool isSolar() const override
virtual QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override
virtual QString name() const override

Static Public Members

QStringList nameList()

Reimplemented Protected Functions

virtual const char16_t *localeMonthData() const override
virtual const QCalendarLocale *localeMonthIndexData() const override

Detailed Description

Solar Hijri Calendar System

The Solar Hijri calendar, also called the Solar Hejri calendar, Shamsi Hijri calendar or Jalali calendar, is the official calendar of Iran and Afghanistan. It begins on the vernal equinox (Nowruz) as determined by astronomical calculation for the Iran Standard Time meridian (52.5°E or GMT+3.5h). This determination of starting moment is more accurate than the Gregorian calendar for predicting the date of the vernal equinox, because it uses astronomical observations rather than mathematical rules.

Calendar Organization

Each of the twelve months corresponds with a zodiac sign. The first six months have 31 days, the next five have 30 days, and the last month has 29 days in usual years but 30 days in leap years. The New Year's Day always falls on the March equinox.

Leap Year Rules

The Solar Hijri calendar produces a five-year leap year interval after about every seven four-year leap year intervals. It usually follows a 33-year cycle with occasional interruptions by single 29-year or 37-year subcycles. The reason for this behavior is that it tracks the observed vernal equinox. By contrast, some less accurate predictive algorithms are in use based on confusion between the average tropical year (365.2422 days, approximated with near 128-year cycles or 2820-year great cycles) and the mean interval between spring equinoxes (365.2424 days, approximated with a near 33-year cycle).

Source: Wikipedia page on Solar Hijri Calendar

Member Function Documentation

[override virtual] bool QJalaliCalendar::dateToJulianDay(int year, int month, int day, qint64 *jd) const

[override virtual] int QJalaliCalendar::daysInMonth(int month, int year = QCalendar::Unspecified) const

[override virtual] bool QJalaliCalendar::isLeapYear(int year) const

[override virtual] bool QJalaliCalendar::isLunar() const

[override virtual] bool QJalaliCalendar::isLuniSolar() const

[override virtual] bool QJalaliCalendar::isSolar() const

[override virtual] QCalendar::YearMonthDay QJalaliCalendar::julianDayToDate(qint64 jd) const

[override virtual protected] const char16_t *QJalaliCalendar::localeMonthData() const

[override virtual protected] const QCalendarLocale *QJalaliCalendar::localeMonthIndexData() const

[override virtual] QString QJalaliCalendar::name() const

[static] QStringList QJalaliCalendar::nameList()

© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.