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
qromancalendar.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qglobal.h"
5#include "qromancalendar_p.h"
7
9
26int QRomanCalendar::daysInMonth(int month, int year) const
27{
28 if (!year || month < 1 || month > 12)
29 return 0;
30
31 if (month == 2)
32 return isLeapYear(year) ? 29 : 28;
33
34 // Long if odd up to July = 7, or if even from 8 = August onwards:
35 return 30 | ((month & 1) ^ (month >> 3));
36}
37
39{
40 return 28;
41}
42
44{
45 return false;
46}
47
49{
50 return false;
51}
52
54{
55 return true;
56}
57
62
63const char16_t *QRomanCalendar::localeMonthData() const
64{
66}
67
virtual bool isLeapYear(int year) const =0
Returns true if the specified year is a leap year for this calendar.
const QCalendarLocale * localeMonthIndexData() const override
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.
bool isLunar() const override
Returns true if this calendar is a lunar calendar.
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.
const char16_t * localeMonthData() const override
Combined button and popup list for selecting options.
static constexpr QCalendarLocale locale_data[]
static constexpr char16_t months_data[]