9#include <QtCore/qdatetime.h>
56 return qMod<4>(year < 0 ? year + 1 : year) == 0;
77 const auto year4Day = qDivMod<FourYears>(4 * (jd -
JulianBaseJd) - 1);
80 const int y = year4Day.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.
bool isLeapYear(int year) const override
Returns true if the specified year is a leap year for this 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.
static QStringList nameList()
QCalendar::YearMonthDay julianDayToDate(qint64 jd) const override
Computes the year, month, and day in this calendar for the given Julian day number jd.
\macro QT_RESTRICTED_CAST_FROM_ASCII
constexpr qint64 LeapDayGregorian1Bce
constexpr auto dayInYearToYmd(int dayInYear)
constexpr auto yearMonthToYearDays(int year, int month)
constexpr unsigned FourYears
Combined button and popup list for selecting options.
constexpr qint64 JulianBaseJd
#define QStringLiteral(str)