![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QRomanCalendar class is a shared base for calendars based on the ancient Roman calendar. More...
#include <qromancalendar_p.h>
Public Member Functions | |
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. | |
QString | monthName (const QLocale &locale, int month, int year, QLocale::FormatType format) const override |
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. | |
QString | standaloneMonthName (const QLocale &locale, int month, int year, QLocale::FormatType format) const override |
Returns the standalone name of the specified month in the chosen locale, using the specified format to determine how complete the name is. | |
![]() | |
QCalendarBackend ()=default | |
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 | 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 | 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 | 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 qint64 | matchCenturyToWeekday (const QCalendar::YearMonthDay &parts, int dow) const |
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. | |
Protected Member Functions | |
const QCalendarLocale * | localeMonthIndexData () const override |
const char16_t * | localeMonthData () const override |
Additional Inherited Members | |
![]() | |
static QStringList | availableCalendars () |
Returns a list of names of the available calendar systems. | |
The QRomanCalendar class is a shared base for calendars based on the ancient Roman calendar.
\inmodule QtCore
Calendars based on the ancient Roman calendar have several common properties: they have the same names for months, the month lengths depend in a common way on whether the year is a leap year. They differ in how they determine which years are leap years.
Definition at line 22 of file qromancalendar_p.h.
|
overridevirtual |
Returns number of days in the month number month, in year year.
An implementation should return 0 if the given year had no such month. If year is QCalendar::Unspecified, return the usual number of days for the month, in those years that include it.
Calendars with intercallary days may represent these as extra days of the preceding month, or as short months separate from the usual ones. In the former case, daysInMonth(month, year) should be the number of ordinary days in the month, although {isDateValid(year, month, day)} might return
true
for some larger values of day
.
Implements QCalendarBackend.
Definition at line 26 of file qromancalendar.cpp.
|
overridevirtual |
Returns true
if this calendar is a lunar calendar.
Otherwise returns false
.
A lunar calendar is a calendar based upon the monthly cycles of the Moon's phases (synodic months). This contrasts with solar calendars, whose annual cycles are based only upon the solar year.
Implements QCalendarBackend.
Definition at line 43 of file qromancalendar.cpp.
|
overridevirtual |
Returns true
if this calendar is a lunisolar calendar.
Otherwise returns false
.
A lunisolar calendar is a calendar whose date indicates both the moon phase and the time of the solar year.
Implements QCalendarBackend.
Definition at line 48 of file qromancalendar.cpp.
|
overridevirtual |
Returns true
if this calendar is a solar calendar.
Otherwise returns false
.
A solar calendar is a calendar whose dates indicate the season or almost equivalently the apparent position of the sun relative to the fixed stars. The Gregorian calendar, widely accepted as standard in the world, is an example of solar calendar.
Implements QCalendarBackend.
Definition at line 53 of file qromancalendar.cpp.
|
overrideprotectedvirtual |
Implements QCalendarBackend.
Definition at line 63 of file qromancalendar.cpp.
|
overrideprotectedvirtual |
Implements QCalendarBackend.
Definition at line 58 of file qromancalendar.cpp.
|
overridevirtual |
Returns the minimum number of days in any valid month of any valid year.
This base implementation returns 29, as this is a common case.
Reimplemented from QCalendarBackend.
Definition at line 38 of file qromancalendar.cpp.
|
overridevirtual |
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.
If year is Unspecified, return the name for the month that usually has this number within a typical year. Calendars with a leap month that isn't always the last may need to take account of the year to map the month number to the particular year's month with that number.
Reimplemented from QCalendarBackend.
Definition at line 3415 of file qlocale.cpp.
|
overridevirtual |
Returns the standalone name of the specified month in the chosen locale, using the specified format to determine how complete the name is.
If year is Unspecified, return the standalone name for the month that usually has this number within a typical year. Calendars with a leap month that isn't always the last may need to take account of the year to map the month number to the particular year's month with that number.
Reimplemented from QCalendarBackend.
Definition at line 3450 of file qlocale.cpp.