KDECore
kcalendarsystemgregorian.cpp
Go to the documentation of this file.
56 KConfigGroup cg(config(), QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
66 format = i18nc("(kdedt-format) Gregorian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC");
76 format = i18nc("(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC");
164 QString KCalendarSystemGregorianPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
202 return ki18nc("Gregorian month 1 - KLocale::ShortName Possessive", "of Jan").toString(locale());
204 return ki18nc("Gregorian month 2 - KLocale::ShortName Possessive", "of Feb").toString(locale());
206 return ki18nc("Gregorian month 3 - KLocale::ShortName Possessive", "of Mar").toString(locale());
208 return ki18nc("Gregorian month 4 - KLocale::ShortName Possessive", "of Apr").toString(locale());
210 return ki18nc("Gregorian month 5 - KLocale::ShortName Possessive", "of May").toString(locale());
212 return ki18nc("Gregorian month 6 - KLocale::ShortName Possessive", "of Jun").toString(locale());
214 return ki18nc("Gregorian month 7 - KLocale::ShortName Possessive", "of Jul").toString(locale());
216 return ki18nc("Gregorian month 8 - KLocale::ShortName Possessive", "of Aug").toString(locale());
218 return ki18nc("Gregorian month 9 - KLocale::ShortName Possessive", "of Sep").toString(locale());
220 return ki18nc("Gregorian month 10 - KLocale::ShortName Possessive", "of Oct").toString(locale());
222 return ki18nc("Gregorian month 11 - KLocale::ShortName Possessive", "of Nov").toString(locale());
224 return ki18nc("Gregorian month 12 - KLocale::ShortName Possessive", "of Dec").toString(locale());
264 return ki18nc("Gregorian month 1 - KLocale::LongName Possessive", "of January").toString(locale());
266 return ki18nc("Gregorian month 2 - KLocale::LongName Possessive", "of February").toString(locale());
268 return ki18nc("Gregorian month 3 - KLocale::LongName Possessive", "of March").toString(locale());
270 return ki18nc("Gregorian month 4 - KLocale::LongName Possessive", "of April").toString(locale());
274 return ki18nc("Gregorian month 6 - KLocale::LongName Possessive", "of June").toString(locale());
276 return ki18nc("Gregorian month 7 - KLocale::LongName Possessive", "of July").toString(locale());
278 return ki18nc("Gregorian month 8 - KLocale::LongName Possessive", "of August").toString(locale());
280 return ki18nc("Gregorian month 9 - KLocale::LongName Possessive", "of September").toString(locale());
282 return ki18nc("Gregorian month 10 - KLocale::LongName Possessive", "of October").toString(locale());
284 return ki18nc("Gregorian month 11 - KLocale::LongName Possessive", "of November").toString(locale());
286 return ki18nc("Gregorian month 12 - KLocale::LongName Possessive", "of December").toString(locale());
323 QString KCalendarSystemGregorianPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
471 QString KCalendarSystemGregorian::weekDayName(const QDate &date, WeekDayNameFormat format) const
static QString calendarType(KLocale::CalendarSystem calendarSystem)
Definition: kcalendarsystem.cpp:214
QString toString() const
Finalizes the translation, creates QString with placeholders substituted.
Definition: klocalizedstring.cpp:192
virtual bool isLeapYear(int year) const =0
Returns whether a given year is a leap year.
Definition: kcalendarsystem.cpp:1720
virtual QString weekDayName(int weekDay, WeekDayNameFormat format=LongDayName) const
Gets specific calendar type week day name.
Definition: kcalendarsystemgregorian.cpp:466
virtual QString monthName(int month, int year, MonthNameFormat format=LongName) const =0
Gets specific calendar type month name for a given month number If an invalid month is specified...
Definition: kcalendarsystem.cpp:1842
virtual bool isLeapYear(int year) const
Definition: kcalendarsystemgregorian.cpp:117
virtual int yearStringToInteger(const QString &sNum, int &iLength) const
Definition: kcalendarsystemgregorian.cpp:476
virtual bool isProleptic() const
Returns whether the calendar system is proleptic, i.e.
Definition: kcalendarsystemgregorian.cpp:501
virtual int monthsInYear(int year) const
Definition: kcalendarsystemgregorian.cpp:80
virtual QDate earliestValidDate() const
Returns the earliest date valid in this calendar system implementation.
Definition: kcalendarsystem.cpp:1120
virtual bool isLunar() const
Returns whether the calendar is lunar based.
Definition: kcalendarsystemgregorian.cpp:486
bool m_useCommonEra
Definition: kcalendarsystemgregorianprivate_p.h:51
virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const
Internal method to convert a Julian Day number into the YMD values for this calendar system...
Definition: kcalendarsystemgregorian.cpp:506
virtual bool isLeapYear(int year) const
Returns whether a given year is a leap year.
Definition: kcalendarsystemgregorian.cpp:446
KCalendarSystem abstract base class, provides support for local Calendar Systems in KDE...
Definition: kcalendarsystem.h:40
QString i18nc(const char *ctxt, const char *text)
Returns a localized version of a string and a context.
Definition: klocalizedstring.h:797
virtual void loadDefaultEraList()
Definition: kcalendarsystemgregorian.cpp:52
virtual KLocale::CalendarSystem calendarSystem() const
Definition: kcalendarsystemgregorian.cpp:45
virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
Definition: kcalendarsystemgregorian.cpp:164
virtual int weekDayOfPray() const
Definition: kcalendarsystemgregorian.cpp:481
virtual QString monthName(int month, int year, MonthNameFormat format=LongName) const
Gets specific calendar type month name for a given month number If an invalid month is specified...
Definition: kcalendarsystemgregorian.cpp:456
virtual QDate epoch() const
Returns a QDate holding the epoch of the calendar system.
Definition: kcalendarsystem.cpp:1115
virtual int maxMonthsInYear() const
Definition: kcalendarsystemgregorian.cpp:149
virtual int daysInYear(int year) const
Definition: kcalendarsystemgregorian.cpp:103
virtual int month(const QDate &date) const
Returns the month portion of a given date in the current calendar system.
Definition: kcalendarsystem.cpp:1344
virtual int maxDaysInWeek() const
Definition: kcalendarsystemgregorian.cpp:144
virtual bool hasYearZero() const
Definition: kcalendarsystemgregorian.cpp:139
virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
Definition: kcalendarsystemgregorian.cpp:323
virtual int earliestValidYear() const
Definition: kcalendarsystemgregorian.cpp:154
virtual int latestValidYear() const
Definition: kcalendarsystemgregorian.cpp:159
Gregorian Calendar, pure proleptic implementation.
Definition: klocale.h:788
virtual bool isValid(int year, int month, int day) const =0
Returns whether a given date is valid in this calendar system.
Definition: kcalendarsystem.cpp:1133
virtual int daysInMonth(int year, int month) const
Definition: kcalendarsystemgregorian.cpp:86
virtual bool hasLeapMonths() const
Definition: kcalendarsystemgregorian.cpp:134
virtual int daysInWeek() const
Definition: kcalendarsystemgregorian.cpp:112
virtual ~KCalendarSystemGregorian()
Definition: kcalendarsystemgregorian.cpp:408
virtual int yearStringToInteger(const QString &sNum, int &iLength) const
Definition: kcalendarsystem.cpp:2018
virtual QDate latestValidDate() const
Returns the latest date valid in this calendar system implementation.
Definition: kcalendarsystem.cpp:1127
virtual int year(const QDate &date) const
Returns the year portion of a given date in the current calendar system.
Definition: kcalendarsystem.cpp:1331
KCalendarSystemGregorian(const KLocale *locale=0)
Definition: kcalendarsystemgregorian.cpp:387
virtual ~KCalendarSystemGregorianPrivate()
Definition: kcalendarsystemgregorian.cpp:41
KLocale provides support for country specific stuff like the national language.
Definition: klocale.h:69
virtual bool dateToJulianDay(int year, int month, int day, int &jd) const
Internal method to convert YMD values for this calendar system into a Julian Day number.
Definition: kcalendarsystemgregorian.cpp:534
KLocalizedString ki18nc(const char *ctxt, const char *msg)
Creates localized string from a given message, with added context.
Definition: klocalizedstring.cpp:929
virtual bool isLunisolar() const
Returns whether the calendar is lunisolar based.
Definition: kcalendarsystemgregorian.cpp:491
virtual QDate earliestValidDate() const
Returns the earliest date valid in this calendar system implementation.
Definition: kcalendarsystemgregorian.cpp:422
virtual QString calendarType() const
Definition: kcalendarsystemgregorian.cpp:412
QString fromLatin1(const char *str, int size)
virtual bool isSolar() const
Returns whether the calendar is solar based.
Definition: kcalendarsystemgregorian.cpp:496
static KLocale::CalendarSystem calendarSystem(const QString &calendarType)
Definition: kcalendarsystem.cpp:183
QDate addDays(int ndays) const
QDate fromJulianDay(int jd)
virtual QDate epoch() const
Returns a QDate holding the epoch of the calendar system.
Definition: kcalendarsystemgregorian.cpp:417
KCalendarSystemGregorianPrivate(KCalendarSystemGregorian *q)
Definition: kcalendarsystemgregorian.cpp:36
virtual QString weekDayName(int weekDay, WeekDayNameFormat format=LongDayName) const =0
Gets specific calendar type week day name.
Definition: kcalendarsystem.cpp:1881
virtual QDate latestValidDate() const
Returns the latest date valid in this calendar system implementation.
Definition: kcalendarsystemgregorian.cpp:428
virtual bool isValid(int year, int month, int day) const
Returns whether a given date is valid in this calendar system.
Definition: kcalendarsystemgregorian.cpp:436
void addEra(char direction, int offset, const QDate &startDate, int startYear, const QDate &endDate, const QString &name, const QString &shortName, const QString &format)
Definition: kcalendarsystem.cpp:1000
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.