![]() |
Qt 6.x
The Qt SDK
|
The QMilankovicCalendar class provides Milanković calendar system implementation. More...
#include <qmilankoviccalendar_p.h>
Public Member Functions | |
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. | |
QCalendar::YearMonthDay | julianDayToDate (qint64 jd) const override |
Computes the year, month, and day in this calendar for the given Julian day number jd. | |
![]() | |
int | daysInMonth (int month, int year=QCalendar::Unspecified) const override |
Returns number of days in the month number month, in year year. | |
int | minimumDaysInMonth () const override |
Returns the minimum number of days in any valid month of any valid year. | |
bool | isLunar () const override |
Returns true if this calendar is a lunar calendar. | |
bool | isLuniSolar () const override |
Returns true if this calendar is a lunisolar calendar. | |
bool | isSolar () const override |
Returns true if this calendar is a solar calendar. | |
![]() | |
virtual | ~QCalendarBackend () |
Destroys the calendar backend. | |
virtual QString | name () const =0 |
Returns the primary name of the calendar. | |
QStringList | names () const |
Returns list of names this backend was registered with. | |
QCalendar::System | calendarSystem () const |
The calendar system of this calendar. | |
QCalendar::SystemId | calendarId () const |
virtual int | daysInMonth (int month, int year=QCalendar::Unspecified) const =0 |
Returns number of days in the month number month, in year year. | |
virtual int | daysInYear (int year) const |
Returns the total number of days in the year number year. | |
virtual int | monthsInYear (int year) const |
Returns the total number of months 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 returns false . | |
virtual bool | isLeapYear (int year) const =0 |
Returns true if the specified year is a leap year for this calendar. | |
virtual bool | isLunar () const =0 |
Returns true if this calendar is a lunar calendar. | |
virtual bool | isLuniSolar () const =0 |
Returns true if this calendar is a lunisolar calendar. | |
virtual bool | isSolar () const =0 |
Returns true if this calendar is a solar calendar. | |
virtual bool | isProleptic () const |
Returns true if this calendar is a proleptic calendar. | |
virtual bool | hasYearZero () const |
Returns true if year number 0 is considered a valid year in this calendar. | |
virtual int | maximumDaysInMonth () const |
Returns the maximum number of days in a month for any year. | |
virtual int | minimumDaysInMonth () const |
Returns the minimum number of days in any valid month of any valid year. | |
virtual int | maximumMonthsInYear () const |
Returns the maximum number of months possible in any year. | |
virtual bool | dateToJulianDay (int year, int month, int day, qint64 *jd) const =0 |
Computes the Julian day number corresponding to the specified year, month, and day. | |
virtual QCalendar::YearMonthDay | julianDayToDate (qint64 jd) const =0 |
Computes the year, month, and day in this calendar for the given Julian day number jd. | |
virtual int | dayOfWeek (qint64 jd) const |
Returns the day of the week for the given Julian Day Number jd. | |
virtual QString | monthName (const QLocale &locale, int month, int year, QLocale::FormatType format) const |
Returns the name of the specified month in the given year for the chosen locale, using the given format to determine how complete the name is. | |
virtual QString | standaloneMonthName (const QLocale &locale, int month, int year, QLocale::FormatType format) const |
Returns the standalone name of the specified month in the chosen locale, using the specified format to determine how complete the name is. | |
virtual QString | weekDayName (const QLocale &locale, int day, QLocale::FormatType format) const |
Returns the name of the specified day of the week in the chosen locale, using the specified format to determine how complete the name is. | |
virtual QString | standaloneWeekDayName (const QLocale &locale, int day, QLocale::FormatType format) const |
Returns the standalone name of the specified day of the week in the chosen locale, using the specified format to determine how complete the name is. | |
virtual QString | dateTimeToString (QStringView format, const QDateTime &datetime, QDate dateOnly, QTime timeOnly, const QLocale &locale) const |
Returns a string representing a given date, time or date-time. | |
bool | isGregorian () const |
QCalendar::SystemId | registerCustomBackend (const QStringList &names) |
Register this backend as a custom backend. | |
Static Public Member Functions | |
static QStringList | nameList () |
![]() | |
static QStringList | availableCalendars () |
Returns a list of names of the available calendar systems. | |
Additional Inherited Members | |
![]() | |
const QCalendarLocale * | localeMonthIndexData () const override |
const char16_t * | localeMonthData () const override |
virtual const QCalendarLocale * | localeMonthIndexData () const =0 |
virtual const char16_t * | localeMonthData () const =0 |
The QMilankovicCalendar class provides Milanković calendar system implementation.
\inmodule QtCore
The Revised Julian calendar, also known as the Milanković calendar, or, less formally, new calendar, is a calendar, developed and proposed by the Serbian scientist Milutin Milanković in 1923, which effectively discontinued the 340 years of divergence between the naming of dates sanctioned by those Eastern Orthodox churches adopting it and the Gregorian calendar that has come to predominate worldwide. This calendar was intended to replace the ecclesiastical calendar based on the Julian calendar hitherto in use by all of the Eastern Orthodox Church. The Revised Julian calendar temporarily aligned its dates with the Gregorian calendar proclaimed in 1582 by Pope Gregory XIII for adoption by the Christian world. The calendar has been adopted by the Orthodox churches of Constantinople, Albania, Alexandria, Antioch, Bulgaria, Cyprus, Greece, Poland, and Romania.
Source: \l {https://en.wikipedia.org/wiki/Revised_Julian_calendar}{Wikipedia page on Milanković Calendar}
Definition at line 22 of file qmilankoviccalendar_p.h.
|
overridevirtual |
Computes the Julian day number corresponding to the specified year, month, and day.
Returns true and sets jd if there is such a date in this calendar; otherwise, returns false.
Implements QCalendarBackend.
Definition at line 74 of file qmilankoviccalendar.cpp.
References QCalendarBackend::isDateValid(), LeapCentury, MilankovicBaseJd, NineCenturies, Q_ASSERT, and QRomanCalendrical::yearMonthToYearDays().
|
overridevirtual |
Returns true
if the specified year is a leap year for this calendar.
Implements QCalendarBackend.
Definition at line 49 of file qmilankoviccalendar.cpp.
References QCalendar::Unspecified.
|
overridevirtual |
Computes the year, month, and day in this calendar for the given Julian day number jd.
If the given day falls outside this calendar's scope (e.g. before the start-date of a non-proleptic calendar), the returned structure's isValid() is false; otherwise, its year, month, and day fields provide this calendar's description of the date.
Implements QCalendarBackend.
Definition at line 88 of file qmilankoviccalendar.cpp.
References QRomanCalendrical::dayInYearToYmd(), and MilankovicBaseJd.
|
overridevirtual |
Returns the primary name of the calendar.
Implements QCalendarBackend.
Definition at line 39 of file qmilankoviccalendar.cpp.
References QStringLiteral.
|
static |
Definition at line 44 of file qmilankoviccalendar.cpp.
References QStringLiteral.