KDECore
#include <kcalendarsystemthai_p.h>

Protected Member Functions | |
KCalendarSystemThai (KCalendarSystemThaiPrivate &dd, const KSharedConfig::Ptr config=KSharedConfig::Ptr(), const KLocale *locale=0) | |
virtual bool | dateToJulianDay (int year, int month, int day, int &jd) const |
virtual bool | julianDayToDate (int jd, int &year, int &month, int &day) const |
![]() | |
KCalendarSystemGregorian (KCalendarSystemGregorianPrivate &dd, const KSharedConfig::Ptr config=KSharedConfig::Ptr(), const KLocale *locale=0) | |
![]() | |
KCalendarSystem (KCalendarSystemPrivate &dd, const KSharedConfig::Ptr config=KSharedConfig::Ptr(), const KLocale *locale=0) | |
const KLocale * | locale () const |
void | setHasYear0 (bool hasYear0) |
void | setMaxDaysInWeek (int maxDays) |
void | setMaxMonthsInYear (int maxMonths) |
Detailed Description
This is the Thai calendar implementation which is the Gregorian calendar but using a different Epoch
license GNU-LGPL v.2 or later
- See also
- KLocale,KCalendarSystem
Definition at line 38 of file kcalendarsystemthai_p.h.
Constructor & Destructor Documentation
◆ KCalendarSystemThai() [1/3]
Definition at line 84 of file kcalendarsystemthai.cpp.
◆ KCalendarSystemThai() [2/3]
|
explicit |
Definition at line 90 of file kcalendarsystemthai.cpp.
◆ ~KCalendarSystemThai()
|
virtual |
Definition at line 103 of file kcalendarsystemthai.cpp.
◆ KCalendarSystemThai() [3/3]
|
protected |
Definition at line 96 of file kcalendarsystemthai.cpp.
Member Function Documentation
◆ calendarType()
|
virtual |
- Deprecated
- use calendarSystem() instead
Returns the calendar system type.
- Returns
- type of calendar system
Reimplemented from KCalendarSystemGregorian.
Definition at line 107 of file kcalendarsystemthai.cpp.
◆ dateToJulianDay()
|
protectedvirtual |
Internal method to convert YMD values for this calendar system into a Julian Day number.
All calendar system implementations MUST implement julianDayToDate and dateToJulianDay methods as all other methods can be expressed as functions of these. Does no internal validity checking.
- See also
- KCalendarSystem::julianDayToDate
- Parameters
-
year year number month month number day day of month jd Julian day number returned in this variable
- Returns
true
if the date is valid,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 182 of file kcalendarsystemthai.cpp.
◆ earliestValidDate()
|
virtual |
Returns the earliest date valid in this calendar system implementation.
If the calendar system is proleptic then this may be before epoch.
- Returns
- date the earliest valid date
Reimplemented from KCalendarSystemGregorian.
Definition at line 118 of file kcalendarsystemthai.cpp.
◆ epoch()
|
virtual |
Returns a QDate holding the epoch of the calendar system.
Usually YMD of 1/1/1, access the returned QDates method toJulianDay() if you require the actual Julian day number. Note: a particular calendar system implementation may not include the epoch in its supported range, or the calendar system may be proleptic in which case it supports dates before the epoch.
- See also
- KCalendarSystem::earliestValidDate
- KCalendarSystem::latestValidDate
- KCalendarSystem::isProleptic
- KCalendarSystem::isValid
- Returns
- epoch of calendar system
Reimplemented from KCalendarSystemGregorian.
Definition at line 112 of file kcalendarsystemthai.cpp.
◆ isLeapYear() [1/2]
Returns whether a given date falls in a leap year.
Input date must be checked for validity in current Calendar System prior to calling, no validity checking performed in this routine, behaviour is undefined in invalid case.
- Parameters
-
date the date to check
- Returns
true
if the date falls in a leap year,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 145 of file kcalendarsystemthai.cpp.
◆ isLeapYear() [2/2]
|
virtual |
Returns whether a given year is a leap year.
Input year must be checked for validity in current Calendar System prior to calling, no validity checking performed in this routine, behaviour is undefined in invalid case.
- Parameters
-
year the year to check
- Returns
true
if the year is a leap year,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 140 of file kcalendarsystemthai.cpp.
◆ isLunar()
|
virtual |
Returns whether the calendar is lunar based.
- Returns
true
if the calendar is lunar based,false
if not
Reimplemented from KCalendarSystemGregorian.
Definition at line 155 of file kcalendarsystemthai.cpp.
◆ isLunisolar()
|
virtual |
Returns whether the calendar is lunisolar based.
- Returns
true
if the calendar is lunisolar based,false
if not
Reimplemented from KCalendarSystemGregorian.
Definition at line 160 of file kcalendarsystemthai.cpp.
◆ isProleptic()
|
virtual |
Returns whether the calendar system is proleptic, i.e.
whether dates before the epoch are supported.
- See also
- KCalendarSystem::epoch
- Returns
true
if the calendar system is proleptic,false
if not
Reimplemented from KCalendarSystemGregorian.
Definition at line 170 of file kcalendarsystemthai.cpp.
◆ isSolar()
|
virtual |
Returns whether the calendar is solar based.
- Returns
true
if the calendar is solar based,false
if not
Reimplemented from KCalendarSystemGregorian.
Definition at line 165 of file kcalendarsystemthai.cpp.
◆ isValid() [1/2]
Returns whether a given date is valid in this calendar system.
- Parameters
-
date the date to check
- Returns
true
if the date is valid,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 135 of file kcalendarsystemthai.cpp.
◆ isValid() [2/2]
|
virtual |
Returns whether a given date is valid in this calendar system.
- Parameters
-
year the year portion of the date to check month the month portion of the date to check day the day portion of the date to check
- Returns
true
if the date is valid,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 130 of file kcalendarsystemthai.cpp.
◆ julianDayToDate()
|
protectedvirtual |
Internal method to convert a Julian Day number into the YMD values for this calendar system.
All calendar system implementations MUST implement julianDayToDate and dateToJulianDay methods as all other methods can be expressed as functions of these. Does no internal validity checking.
- See also
- KCalendarSystem::dateToJulianDay
- Parameters
-
jd Julian day number to convert to date year year number returned in this variable month month number returned in this variable day day of month returned in this variable
- Returns
true
if the date is valid,false
otherwise
Reimplemented from KCalendarSystemGregorian.
Definition at line 175 of file kcalendarsystemthai.cpp.
◆ latestValidDate()
|
virtual |
Returns the latest date valid in this calendar system implementation.
- Returns
- date the latest valid date
Reimplemented from KCalendarSystemGregorian.
Definition at line 123 of file kcalendarsystemthai.cpp.
◆ weekDayOfPray()
|
virtual |
- Deprecated
- use KLocale::weekDayOfPray() instead
Returns the day of the week traditionally associated with religious observance for this calendar system. Note this may not be accurate for the users locale, e.g. Gregorian calendar used in non-Christian countries, in use cases where this could be an issue it is recommended to use KLocale::weekDayOfPray() instead.
- Returns
- day number (None = 0, Monday = 1, ..., Sunday = 7)
Reimplemented from KCalendarSystemGregorian.
Definition at line 150 of file kcalendarsystemthai.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.