Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QIslamicCivilCalendar Class Reference

Implements a commonly-used computed version of the Islamic calendar. More...

#include <qislamiccivilcalendar_p.h>

+ Inheritance diagram for QIslamicCivilCalendar:
+ Collaboration diagram for QIslamicCivilCalendar:

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.
 
- Public Member Functions inherited from QHijriCalendar
int daysInMonth (int month, int year=QCalendar::Unspecified) const override
 Returns number of days in the month number month, in year year.
 
int maximumDaysInMonth () const override
 Returns the maximum number of days in a month for any year.
 
int daysInYear (int year) const override
 Returns the total number of days in the year number 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.
 
- Public Member Functions inherited from QCalendarBackend
 QCalendarBackend ()=default
 
virtual ~QCalendarBackend ()
 Destroys the calendar backend.
 
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 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 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 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 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 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 Public Member Functions inherited from QCalendarBackend
static QStringList availableCalendars ()
 Returns a list of names of the available calendar systems.
 

Additional Inherited Members

- Protected Member Functions inherited from QHijriCalendar
const QCalendarLocalelocaleMonthIndexData () const override
 
const char16_t * localeMonthData () const override
 

Detailed Description

Implements a commonly-used computed version of the Islamic calendar.

Since
5.14

\inmodule QtCore

QIslamicCivilCalendar implements a tabular version of the Hijri calendar which is known as the Islamic Civil Calendar. It has the same numbering of years and months, but the months are determined by arithmetical rules rather than by observation or astronomical calculations.

The civil calendar follows the usual tabular scheme of odd-numbered months and the last month of each leap year being 30 days long, the rest being 29 days long. Its determination of leap years follows a 30-year cycle, in each of which the years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29 are leap years.

See also
QHijriCalendar, QCalendar

Definition at line 24 of file qislamiccivilcalendar_p.h.

Member Function Documentation

◆ dateToJulianDay()

bool QIslamicCivilCalendar::dateToJulianDay ( int year,
int month,
int day,
qint64 * jd ) const
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.

See also
QCalendar::partsFromDate(), julianDayToDate()

Implements QCalendarBackend.

Definition at line 70 of file qislamiccivilcalendar.cpp.

References ElevenMonths, EpochJd, QCalendarBackend::isDateValid(), Q_ASSERT, and ThirtyYears.

+ Here is the call graph for this function:

◆ isLeapYear()

bool QIslamicCivilCalendar::isLeapYear ( int year) const
overridevirtual

Returns true if the specified year is a leap year for this calendar.

See also
daysInYear(), isDateValid()

Implements QCalendarBackend.

Definition at line 54 of file qislamiccivilcalendar.cpp.

References QCalendar::Unspecified.

◆ julianDayToDate()

QCalendar::YearMonthDay QIslamicCivilCalendar::julianDayToDate ( qint64 jd) const
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.

See also
QCalendar::dateFromParts(), dateToJulianDay()

Implements QCalendarBackend.

Definition at line 82 of file qislamiccivilcalendar.cpp.

References EpochJd.

◆ name()

QString QIslamicCivilCalendar::name ( ) const
overridevirtual

Returns the primary name of the calendar.

Implements QCalendarBackend.

Definition at line 38 of file qislamiccivilcalendar.cpp.

References QStringLiteral.

◆ nameList()

QStringList QIslamicCivilCalendar::nameList ( )
static

Definition at line 43 of file qislamiccivilcalendar.cpp.

References QStringLiteral.


The documentation for this class was generated from the following files: