8#include <QtCore/qdatetime.h>
57 const auto yeardm = qDivMod<100>(year);
58 if (yeardm.remainder == 0) {
59 const qint16 century = qMod<9>(yeardm.quotient);
60 if (century != 2 && century != 6)
81 const auto centuryYear = qDivMod<100>(yearDays.year);
90 const auto century9Day = qDivMod<NineCenturies>(9 * (jd -
MilankovicBaseJd) - 7);
92 const auto year100Day = qDivMod<LeapCentury>(100 * qDiv<9>(century9Day.remainder) + 99);
95 const int y = 100 * century9Day.quotient + year100Day.quotient + ymd.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...
QString name() const override
Returns the primary name of the calendar.
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override
Computes the year, month, and day in this calendar for the given Julian day number jd.
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.
bool isLeapYear(int year) const override
Returns true if the specified year is a leap year for this calendar.
static QStringList nameList()
\macro QT_RESTRICTED_CAST_FROM_ASCII
constexpr qint64 LeapDayGregorian1Bce
constexpr auto dayInYearToYmd(int dayInYear)
constexpr auto yearMonthToYearDays(int year, int month)
Combined button and popup list for selecting options.
constexpr qint64 MilankovicBaseJd
constexpr unsigned NineCenturies
constexpr unsigned LeapCentury
#define QStringLiteral(str)