• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • date
kcalendarsystemethiopian.cpp
Go to the documentation of this file.
1/*
2 Copyright 2009, 2010 John Layt <john@layt.net>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#include "kcalendarsystemethiopian_p.h"
21#include "kcalendarsystemcopticprivate_p.h"
22
23#include "kdebug.h"
24#include "klocale.h"
25
26#include <QtCore/QDate>
27#include <QtCore/QCharRef>
28
29//Reuse the Coptic private implementation
30class KCalendarSystemEthiopianPrivate : public KCalendarSystemCopticPrivate
31{
32public:
33 explicit KCalendarSystemEthiopianPrivate(KCalendarSystemEthiopian *q) : KCalendarSystemCopticPrivate(q) {
34 }
35
36 virtual ~KCalendarSystemEthiopianPrivate() {
37 }
38
39 virtual KLocale::CalendarSystem calendarSystem() const;
40 virtual void loadDefaultEraList();
41 virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
42 virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
43};
44
45KLocale::CalendarSystem KCalendarSystemEthiopianPrivate::calendarSystem() const
46{
47 return KLocale::EthiopianCalendar;
48}
49
50void KCalendarSystemEthiopianPrivate::loadDefaultEraList()
51{
52 QString name, shortName, format;
53 // Incarnation Era, Amätä Mehrät, "Year of Mercy".
54 name = i18nc("Calendar Era: Ethiopian Incarnation Era, years > 0, LongFormat", "Amata Mehrat");
55 shortName = i18nc("Calendar Era: Ethiopian Incarnation Era, years > 0, ShortFormat", "AM");
56 format = i18nc("(kdedt-format) Ethiopian, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC");
57 addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
58}
59
60// Names taken from http://www.ethiopianembassy.at/dates_cycles.htm, alternative transliterations exist
61QString KCalendarSystemEthiopianPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
62{
63 Q_UNUSED(year);
64
65 if (format == KLocale::NarrowName) {
66 switch (month) {
67 case 1:
68 return ki18nc("Ethiopian month 1 - KLocale::NarrowName", "M").toString(locale());
69 case 2:
70 return ki18nc("Ethiopian month 2 - KLocale::NarrowName", "T").toString(locale());
71 case 3:
72 return ki18nc("Ethiopian month 3 - KLocale::NarrowName", "H").toString(locale());
73 case 4:
74 return ki18nc("Ethiopian month 4 - KLocale::NarrowName", "T").toString(locale());
75 case 5:
76 return ki18nc("Ethiopian month 5 - KLocale::NarrowName", "T").toString(locale());
77 case 6:
78 return ki18nc("Ethiopian month 6 - KLocale::NarrowName", "Y").toString(locale());
79 case 7:
80 return ki18nc("Ethiopian month 7 - KLocale::NarrowName", "M").toString(locale());
81 case 8:
82 return ki18nc("Ethiopian month 8 - KLocale::NarrowName", "M").toString(locale());
83 case 9:
84 return ki18nc("Ethiopian month 9 - KLocale::NarrowName", "G").toString(locale());
85 case 10:
86 return ki18nc("Ethiopian month 10 - KLocale::NarrowName", "S").toString(locale());
87 case 11:
88 return ki18nc("Ethiopian month 11 - KLocale::NarrowName", "H").toString(locale());
89 case 12:
90 return ki18nc("Ethiopian month 12 - KLocale::NarrowName", "N").toString(locale());
91 case 13:
92 return ki18nc("Ethiopian month 13 - KLocale::NarrowName", "P").toString(locale());
93 default:
94 return QString();
95 }
96 }
97
98 if (format == KLocale::ShortName && possessive) {
99 switch (month) {
100 case 1:
101 return ki18nc("Ethiopian month 1 - KLocale::ShortName Possessive", "of Mes").toString(locale());
102 case 2:
103 return ki18nc("Ethiopian month 2 - KLocale::ShortName Possessive", "of Teq").toString(locale());
104 case 3:
105 return ki18nc("Ethiopian month 3 - KLocale::ShortName Possessive", "of Hed").toString(locale());
106 case 4:
107 return ki18nc("Ethiopian month 4 - KLocale::ShortName Possessive", "of Tah").toString(locale());
108 case 5:
109 return ki18nc("Ethiopian month 5 - KLocale::ShortName Possessive", "of Ter").toString(locale());
110 case 6:
111 return ki18nc("Ethiopian month 6 - KLocale::ShortName Possessive", "of Yak").toString(locale());
112 case 7:
113 return ki18nc("Ethiopian month 7 - KLocale::ShortName Possessive", "of Mag").toString(locale());
114 case 8:
115 return ki18nc("Ethiopian month 8 - KLocale::ShortName Possessive", "of Miy").toString(locale());
116 case 9:
117 return ki18nc("Ethiopian month 9 - KLocale::ShortName Possessive", "of Gen").toString(locale());
118 case 10:
119 return ki18nc("Ethiopian month 10 - KLocale::ShortName Possessive", "of Sen").toString(locale());
120 case 11:
121 return ki18nc("Ethiopian month 11 - KLocale::ShortName Possessive", "of Ham").toString(locale());
122 case 12:
123 return ki18nc("Ethiopian month 12 - KLocale::ShortName Possessive", "of Neh").toString(locale());
124 case 13:
125 return ki18nc("Ethiopian month 13 - KLocale::ShortName Possessive", "of Pag").toString(locale());
126 default:
127 return QString();
128 }
129 }
130
131 if (format == KLocale::ShortName && !possessive) {
132 switch (month) {
133 case 1:
134 return ki18nc("Ethiopian month 1 - KLocale::ShortName", "Mes").toString(locale());
135 case 2:
136 return ki18nc("Ethiopian month 2 - KLocale::ShortName", "Teq").toString(locale());
137 case 3:
138 return ki18nc("Ethiopian month 3 - KLocale::ShortName", "Hed").toString(locale());
139 case 4:
140 return ki18nc("Ethiopian month 4 - KLocale::ShortName", "Tah").toString(locale());
141 case 5:
142 return ki18nc("Ethiopian month 5 - KLocale::ShortName", "Ter").toString(locale());
143 case 6:
144 return ki18nc("Ethiopian month 6 - KLocale::ShortName", "Yak").toString(locale());
145 case 7:
146 return ki18nc("Ethiopian month 7 - KLocale::ShortName", "Mag").toString(locale());
147 case 8:
148 return ki18nc("Ethiopian month 8 - KLocale::ShortName", "Miy").toString(locale());
149 case 9:
150 return ki18nc("Ethiopian month 9 - KLocale::ShortName", "Gen").toString(locale());
151 case 10:
152 return ki18nc("Ethiopian month 10 - KLocale::ShortName", "Sen").toString(locale());
153 case 11:
154 return ki18nc("Ethiopian month 11 - KLocale::ShortName", "Ham").toString(locale());
155 case 12:
156 return ki18nc("Ethiopian month 12 - KLocale::ShortName", "Neh").toString(locale());
157 case 13:
158 return ki18nc("Ethiopian month 13 - KLocale::ShortName", "Pag").toString(locale());
159 default:
160 return QString();
161 }
162 }
163
164 if (format == KLocale::LongName && possessive) {
165 switch (month) {
166 case 1:
167 return ki18nc("Ethiopian month 1 - KLocale::LongName Possessive", "of Meskerem").toString(locale());
168 case 2:
169 return ki18nc("Ethiopian month 2 - KLocale::LongName Possessive", "of Tequemt").toString(locale());
170 case 3:
171 return ki18nc("Ethiopian month 3 - KLocale::LongName Possessive", "of Hedar").toString(locale());
172 case 4:
173 return ki18nc("Ethiopian month 4 - KLocale::LongName Possessive", "of Tahsas").toString(locale());
174 case 5:
175 return ki18nc("Ethiopian month 5 - KLocale::LongName Possessive", "of Ter").toString(locale());
176 case 6:
177 return ki18nc("Ethiopian month 6 - KLocale::LongName Possessive", "of Yakatit").toString(locale());
178 case 7:
179 return ki18nc("Ethiopian month 7 - KLocale::LongName Possessive", "of Magabit").toString(locale());
180 case 8:
181 return ki18nc("Ethiopian month 8 - KLocale::LongName Possessive", "of Miyazya").toString(locale());
182 case 9:
183 return ki18nc("Ethiopian month 9 - KLocale::LongName Possessive", "of Genbot").toString(locale());
184 case 10:
185 return ki18nc("Ethiopian month 10 - KLocale::LongName Possessive", "of Sene").toString(locale());
186 case 11:
187 return ki18nc("Ethiopian month 11 - KLocale::LongName Possessive", "of Hamle").toString(locale());
188 case 12:
189 return ki18nc("Ethiopian month 12 - KLocale::LongName Possessive", "of Nehase").toString(locale());
190 case 13:
191 return ki18nc("Ethiopian month 13 - KLocale::LongName Possessive", "of Pagumen").toString(locale());
192 default:
193 return QString();
194 }
195 }
196
197 // Default to LongName
198 switch (month) {
199 case 1:
200 return ki18nc("Ethiopian month 1 - KLocale::LongName", "Meskerem").toString(locale());
201 case 2:
202 return ki18nc("Ethiopian month 2 - KLocale::LongName", "Tequemt").toString(locale());
203 case 3:
204 return ki18nc("Ethiopian month 3 - KLocale::LongName", "Hedar").toString(locale());
205 case 4:
206 return ki18nc("Ethiopian month 4 - KLocale::LongName", "Tahsas").toString(locale());
207 case 5:
208 return ki18nc("Ethiopian month 5 - KLocale::LongName", "Ter").toString(locale());
209 case 6:
210 return ki18nc("Ethiopian month 6 - KLocale::LongName", "Yakatit").toString(locale());
211 case 7:
212 return ki18nc("Ethiopian month 7 - KLocale::LongName", "Magabit").toString(locale());
213 case 8:
214 return ki18nc("Ethiopian month 8 - KLocale::LongName", "Miyazya").toString(locale());
215 case 9:
216 return ki18nc("Ethiopian month 9 - KLocale::LongName", "Genbot").toString(locale());
217 case 10:
218 return ki18nc("Ethiopian month 10 - KLocale::LongName", "Sene").toString(locale());
219 case 11:
220 return ki18nc("Ethiopian month 11 - KLocale::LongName", "Hamle").toString(locale());
221 case 12:
222 return ki18nc("Ethiopian month 12 - KLocale::LongName", "Nehase").toString(locale());
223 case 13:
224 return ki18nc("Ethiopian month 13 - KLocale::LongName", "Pagumen").toString(locale());
225 default:
226 return QString();
227 }
228}
229
230// Names taken from http://www.ethiopianembassy.at/dates_cycles.htm, alternative transliterations exist
231QString KCalendarSystemEthiopianPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
232{
233 if (format == KLocale::NarrowName) {
234 switch (weekDay) {
235 case 1:
236 return ki18nc("Ethiopian weekday 1 - KLocale::NarrowName ", "S").toString(locale());
237 case 2:
238 return ki18nc("Ethiopian weekday 2 - KLocale::NarrowName ", "M").toString(locale());
239 case 3:
240 return ki18nc("Ethiopian weekday 3 - KLocale::NarrowName ", "R").toString(locale());
241 case 4:
242 return ki18nc("Ethiopian weekday 4 - KLocale::NarrowName ", "H").toString(locale());
243 case 5:
244 return ki18nc("Ethiopian weekday 5 - KLocale::NarrowName ", "A").toString(locale());
245 case 6:
246 return ki18nc("Ethiopian weekday 6 - KLocale::NarrowName ", "Q").toString(locale());
247 case 7:
248 return ki18nc("Ethiopian weekday 7 - KLocale::NarrowName ", "E").toString(locale());
249 default:
250 return QString();
251 }
252 }
253
254 if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
255 switch (weekDay) {
256 case 1:
257 return ki18nc("Ethiopian weekday 1 - KLocale::ShortName", "Seg").toString(locale());
258 case 2:
259 return ki18nc("Ethiopian weekday 2 - KLocale::ShortName", "Mak").toString(locale());
260 case 3:
261 return ki18nc("Ethiopian weekday 3 - KLocale::ShortName", "Rob").toString(locale());
262 case 4:
263 return ki18nc("Ethiopian weekday 4 - KLocale::ShortName", "Ham").toString(locale());
264 case 5:
265 return ki18nc("Ethiopian weekday 5 - KLocale::ShortName", "Arb").toString(locale());
266 case 6:
267 return ki18nc("Ethiopian weekday 6 - KLocale::ShortName", "Qed").toString(locale());
268 case 7:
269 return ki18nc("Ethiopian weekday 7 - KLocale::ShortName", "Ehu").toString(locale());
270 default: return QString();
271 }
272 }
273
274 switch (weekDay) {
275 case 1:
276 return ki18nc("Ethiopian weekday 1 - KLocale::LongName", "Segno").toString(locale());
277 case 2:
278 return ki18nc("Ethiopian weekday 2 - KLocale::LongName", "Maksegno").toString(locale());
279 case 3:
280 return ki18nc("Ethiopian weekday 3 - KLocale::LongName", "Rob").toString(locale());
281 case 4:
282 return ki18nc("Ethiopian weekday 4 - KLocale::LongName", "Hamus").toString(locale());
283 case 5:
284 return ki18nc("Ethiopian weekday 5 - KLocale::LongName", "Arb").toString(locale());
285 case 6:
286 return ki18nc("Ethiopian weekday 6 - KLocale::LongName", "Qedame").toString(locale());
287 case 7:
288 return ki18nc("Ethiopian weekday 7 - KLocale::LongName", "Ehud").toString(locale());
289 default:
290 return QString();
291 }
292}
293
294
295KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KLocale *locale)
296 : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), KSharedConfig::Ptr(), locale)
297{
298 d_ptr->loadConfig(calendarType());
299}
300
301KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale)
302 : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), config, locale)
303{
304 d_ptr->loadConfig(calendarType());
305}
306
307KCalendarSystemEthiopian::KCalendarSystemEthiopian(KCalendarSystemEthiopianPrivate &dd,
308 const KSharedConfig::Ptr config, const KLocale *locale)
309 : KCalendarSystemCoptic(dd, config, locale)
310{
311 d_ptr->loadConfig(calendarType());
312}
313
314KCalendarSystemEthiopian::~KCalendarSystemEthiopian()
315{
316}
317
318QString KCalendarSystemEthiopian::calendarType() const
319{
320 return QLatin1String("ethiopian");
321}
322
323QDate KCalendarSystemEthiopian::epoch() const
324{
325 //0001-01-01, no Year 0.
326 //0008-08-29 AD Julian
327 return QDate::fromJulianDay(1724221);
328}
329
330QDate KCalendarSystemEthiopian::earliestValidDate() const
331{
332 //0001-01-01, no Year 0.
333 //0008-08-29 AD Julian
334 return QDate::fromJulianDay(1724221);
335}
336
337QDate KCalendarSystemEthiopian::latestValidDate() const
338{
339 // Set to last day of year 9999 until confirm date formats & widgets support > 9999
340 //9999-12-30
341 //100008-08-29 AD Julian
342 return QDate::fromJulianDay(5376721);
343}
344
345bool KCalendarSystemEthiopian::isValid(int year, int month, int day) const
346{
347 return KCalendarSystemCoptic::isValid(year, month, day);
348}
349
350bool KCalendarSystemEthiopian::isValid(const QDate &date) const
351{
352 return KCalendarSystemCoptic::isValid(date);
353}
354
355bool KCalendarSystemEthiopian::isLeapYear(int year) const
356{
357 return KCalendarSystemCoptic::isLeapYear(year);
358}
359
360bool KCalendarSystemEthiopian::isLeapYear(const QDate &date) const
361{
362 return KCalendarSystemCoptic::isLeapYear(date);
363}
364
365QString KCalendarSystemEthiopian::monthName(int month, int year, MonthNameFormat format) const
366{
367 return KCalendarSystemCoptic::monthName(month, year, format);
368}
369
370QString KCalendarSystemEthiopian::monthName(const QDate &date, MonthNameFormat format) const
371{
372 return KCalendarSystemCoptic::monthName(date, format);
373}
374
375QString KCalendarSystemEthiopian::weekDayName(int weekDay, WeekDayNameFormat format) const
376{
377 return KCalendarSystemCoptic::weekDayName(weekDay, format);
378}
379
380QString KCalendarSystemEthiopian::weekDayName(const QDate &date, WeekDayNameFormat format) const
381{
382 return KCalendarSystemCoptic::weekDayName(date, format);
383}
384
385int KCalendarSystemEthiopian::weekDayOfPray() const
386{
387 return 7;
388}
389
390bool KCalendarSystemEthiopian::isLunar() const
391{
392 return KCalendarSystemCoptic::isLunar();
393}
394
395bool KCalendarSystemEthiopian::isLunisolar() const
396{
397 return KCalendarSystemCoptic::isLunisolar();
398}
399
400bool KCalendarSystemEthiopian::isSolar() const
401{
402 return KCalendarSystemCoptic::isSolar();
403}
404
405bool KCalendarSystemEthiopian::isProleptic() const
406{
407 return false;
408}
409
410bool KCalendarSystemEthiopian::julianDayToDate(int jd, int &year, int &month, int &day) const
411{
412 return KCalendarSystemCoptic::julianDayToDate(jd, year, month, day);
413}
414
415bool KCalendarSystemEthiopian::dateToJulianDay(int year, int month, int day, int &jd) const
416{
417 return KCalendarSystemCoptic::dateToJulianDay(year, month, day, jd);
418}
KCalendarSystemCopticPrivate
Definition: kcalendarsystemcopticprivate_p.h:26
KCalendarSystemCopticPrivate::loadDefaultEraList
virtual void loadDefaultEraList()
Definition: kcalendarsystemcoptic.cpp:46
KCalendarSystemCopticPrivate::calendarSystem
virtual KLocale::CalendarSystem calendarSystem() const
Definition: kcalendarsystemcoptic.cpp:41
KCalendarSystemCopticPrivate::monthName
virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
Definition: kcalendarsystemcoptic.cpp:159
KCalendarSystemCopticPrivate::weekDayName
virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
Definition: kcalendarsystemcoptic.cpp:330
KCalendarSystemCoptic
Definition: kcalendarsystemcoptic_p.h:38
KCalendarSystemCoptic::isLeapYear
virtual bool isLeapYear(int year) const
Returns whether a given year is a leap year.
Definition: kcalendarsystemcoptic.cpp:455
KCalendarSystemCoptic::julianDayToDate
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: kcalendarsystemcoptic.cpp:510
KCalendarSystemCoptic::isLunar
virtual bool isLunar() const
Returns whether the calendar is lunar based.
Definition: kcalendarsystemcoptic.cpp:490
KCalendarSystemCoptic::weekDayName
virtual QString weekDayName(int weekDay, WeekDayNameFormat format=LongDayName) const
Gets specific calendar type week day name.
Definition: kcalendarsystemcoptic.cpp:475
KCalendarSystemCoptic::isSolar
virtual bool isSolar() const
Returns whether the calendar is solar based.
Definition: kcalendarsystemcoptic.cpp:500
KCalendarSystemCoptic::dateToJulianDay
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: kcalendarsystemcoptic.cpp:546
KCalendarSystemCoptic::isLunisolar
virtual bool isLunisolar() const
Returns whether the calendar is lunisolar based.
Definition: kcalendarsystemcoptic.cpp:495
KCalendarSystemCoptic::isValid
virtual bool isValid(int year, int month, int day) const
Returns whether a given date is valid in this calendar system.
Definition: kcalendarsystemcoptic.cpp:445
KCalendarSystemCoptic::monthName
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: kcalendarsystemcoptic.cpp:465
KCalendarSystemEthiopian
Definition: kcalendarsystemethiopian_p.h:39
KCalendarSystemEthiopian::isProleptic
virtual bool isProleptic() const
Returns whether the calendar system is proleptic, i.e.
Definition: kcalendarsystemethiopian.cpp:405
KCalendarSystemEthiopian::isLeapYear
virtual bool isLeapYear(int year) const
Returns whether a given year is a leap year.
Definition: kcalendarsystemethiopian.cpp:355
KCalendarSystemEthiopian::latestValidDate
virtual QDate latestValidDate() const
Returns the latest date valid in this calendar system implementation.
Definition: kcalendarsystemethiopian.cpp:337
KCalendarSystemEthiopian::isValid
virtual bool isValid(int year, int month, int day) const
Returns whether a given date is valid in this calendar system.
Definition: kcalendarsystemethiopian.cpp:345
KCalendarSystemEthiopian::weekDayOfPray
virtual int weekDayOfPray() const
Definition: kcalendarsystemethiopian.cpp:385
KCalendarSystemEthiopian::dateToJulianDay
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: kcalendarsystemethiopian.cpp:415
KCalendarSystemEthiopian::isLunisolar
virtual bool isLunisolar() const
Returns whether the calendar is lunisolar based.
Definition: kcalendarsystemethiopian.cpp:395
KCalendarSystemEthiopian::weekDayName
virtual QString weekDayName(int weekDay, WeekDayNameFormat format=LongDayName) const
Gets specific calendar type week day name.
Definition: kcalendarsystemethiopian.cpp:375
KCalendarSystemEthiopian::julianDayToDate
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: kcalendarsystemethiopian.cpp:410
KCalendarSystemEthiopian::isSolar
virtual bool isSolar() const
Returns whether the calendar is solar based.
Definition: kcalendarsystemethiopian.cpp:400
KCalendarSystemEthiopian::epoch
virtual QDate epoch() const
Returns a QDate holding the epoch of the calendar system.
Definition: kcalendarsystemethiopian.cpp:323
KCalendarSystemEthiopian::calendarType
virtual QString calendarType() const
Definition: kcalendarsystemethiopian.cpp:318
KCalendarSystemEthiopian::monthName
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: kcalendarsystemethiopian.cpp:365
KCalendarSystemEthiopian::~KCalendarSystemEthiopian
virtual ~KCalendarSystemEthiopian()
Definition: kcalendarsystemethiopian.cpp:314
KCalendarSystemEthiopian::isLunar
virtual bool isLunar() const
Returns whether the calendar is lunar based.
Definition: kcalendarsystemethiopian.cpp:390
KCalendarSystemEthiopian::earliestValidDate
virtual QDate earliestValidDate() const
Returns the earliest date valid in this calendar system implementation.
Definition: kcalendarsystemethiopian.cpp:330
KCalendarSystemPrivate::q
const KCalendarSystem * q
Definition: kcalendarsystemprivate_p.h:104
KCalendarSystem::day
virtual int day(const QDate &date) const
Returns the day portion of a given date in the current calendar system.
Definition: kcalendarsystem.cpp:1357
KCalendarSystem::year
virtual int year(const QDate &date) const
Returns the year portion of a given date in the current calendar system.
Definition: kcalendarsystem.cpp:1331
KCalendarSystem::MonthNameFormat
MonthNameFormat
Format for returned month / day name.
Definition: kcalendarsystem.h:55
KCalendarSystem::WeekDayNameFormat
WeekDayNameFormat
Format for returned month / day name.
Definition: kcalendarsystem.h:66
KCalendarSystem::KCalendarSystemEthiopian
friend class KCalendarSystemEthiopian
Definition: kcalendarsystem.h:1666
KCalendarSystem::month
virtual int month(const QDate &date) const
Returns the month portion of a given date in the current calendar system.
Definition: kcalendarsystem.cpp:1344
KLocale
KLocale provides support for country specific stuff like the national language.
Definition: klocale.h:70
KLocale::CalendarSystem
CalendarSystem
Definition: klocale.h:780
KLocale::EthiopianCalendar
@ EthiopianCalendar
Ethiopian Calendar, aka Ethiopic Calendar.
Definition: klocale.h:786
KLocale::DateTimeComponentFormat
DateTimeComponentFormat
Definition: klocale.h:908
KLocale::LongName
@ LongName
Long text format, e.g.
Definition: klocale.h:915
KLocale::ShortName
@ ShortName
Short text format, e.g.
Definition: klocale.h:914
KLocale::NarrowName
@ NarrowName
Narrow text format, may not be unique, e.g.
Definition: klocale.h:913
KLocale::ShortNumber
@ ShortNumber
Number at its natural width, e.g.
Definition: klocale.h:910
KLocalizedString::toString
QString toString() const
Finalizes the translation, creates QString with placeholders substituted.
Definition: klocalizedstring.cpp:192
KSharedConfig
KConfig variant using shared memory.
Definition: ksharedconfig.h:41
KSharedPtr< KSharedConfig >
QString
kcalendarsystemcopticprivate_p.h
kcalendarsystemethiopian_p.h
kdebug.h
klocale.h
ki18nc
KLocalizedString ki18nc(const char *ctxt, const char *msg)
Creates localized string from a given message, with added context.
Definition: klocalizedstring.cpp:929
i18nc
QString i18nc(const char *ctxt, const char *text)
Returns a localized version of a string and a context.
Definition: klocalizedstring.h:797
KGlobal::locale
KLocale * locale()
Returns the global locale object.
Definition: kglobal.cpp:170
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal