8#include <QtCore/qmath.h>
100 return qMod<2820>((year + 2346) * 683) < 683;
124 const int y = year - (year < 0 ? 474 : 475);
125 const int c = qDiv<cycleYears>(
y);
128 for (
int i = 1;
i < month; ++
i)
140 if (day >
daysInYear(year <= 0 ? year - 1 : year)) {
147 for (month = 1; month < 12; ++month) {
158 if (year && month > 0 && month <= 12)
159 return month < 7 ? 31 : month < 12 ||
isLeapYear(year) ? 30 : 29;
virtual int daysInYear(int year) const
Returns the total number of days in the year number year.
virtual bool isDateValid(int year, int month, int day) const
Returns true if the date specified by year, month, and day is valid for this calendar; otherwise retu...
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override
Computes the year, month, and day in this calendar for the given Julian day number jd.
const QCalendarLocale * localeMonthIndexData() const override
const char16_t * localeMonthData() const override
static QStringList nameList()
bool isLunar() const override
Returns true if this calendar is a lunar calendar.
int daysInMonth(int month, int year=QCalendar::Unspecified) const override
Returns number of days in the month number month, in year year.
bool isLeapYear(int year) const override
Returns true if the specified year is a leap year for this calendar.
bool isSolar() const override
Returns true if this calendar is a solar calendar.
QString name() const override
Returns the primary name of the calendar.
bool isLuniSolar() const override
Returns true if this calendar is a lunisolar calendar.
bool dateToJulianDay(int year, int month, int day, qint64 *jd) const override
Computes the Julian day number corresponding to the specified year, month, and day.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
static constexpr char16_t months_data[]
static constexpr QCalendarLocale locale_data[]
constexpr qint64 jalaliEpoch
qint64 cycleStart(int cycleNo)
static int cycle(qint64 jdn)
qint64 firstDayOfYear(int year, int cycleNo)
constexpr double yearLength
constexpr qint64 cycleDays
#define QStringLiteral(str)