KDECore
kcalendarsystemhebrew_p.h
Go to the documentation of this file.
00001 /* 00002 Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es> 00003 Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org> 00004 Copyright 2007, 2010 John Layt <john@layt.net> 00005 Calendar conversion routines based on Hdate v6, by Amos 00006 Shapir 1978 (rev. 1985, 1992) 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef KCALENDARSYSTEMHEBREW_H 00025 #define KCALENDARSYSTEMHEBREW_H 00026 00027 #include "kcalendarsystem.h" 00028 00029 class KCalendarSystemHebrewPrivate; 00030 00041 class KCalendarSystemHebrew : public KCalendarSystem 00042 { 00043 public: 00044 explicit KCalendarSystemHebrew(const KLocale * locale = 0); 00045 explicit KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale = 0); 00046 virtual ~KCalendarSystemHebrew(); 00047 00048 virtual QString calendarType() const; 00049 00050 virtual QDate epoch() const; 00051 virtual QDate earliestValidDate() const; 00052 virtual QDate latestValidDate() const; 00053 virtual bool isValid(int year, int month, int day) const; 00054 virtual bool isValid(const QDate &date) const; 00055 00056 virtual int dayOfWeek(const QDate &date) const; 00057 00058 virtual bool isLeapYear(int year) const; 00059 virtual bool isLeapYear(const QDate &date) const; 00060 00061 virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const; 00062 virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const; 00063 00064 virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const; 00065 virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const; 00066 00067 virtual int yearStringToInteger(const QString &sNum, int &iLength) const; 00068 00069 virtual int weekDayOfPray() const; 00070 00071 virtual bool isLunar() const; 00072 virtual bool isLunisolar() const; 00073 virtual bool isSolar() const; 00074 virtual bool isProleptic() const; 00075 00076 protected: 00077 virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const; 00078 virtual bool dateToJulianDay(int year, int month, int day, int &jd) const; 00079 KCalendarSystemHebrew(KCalendarSystemHebrewPrivate &dd, 00080 const KSharedConfig::Ptr config = KSharedConfig::Ptr(), 00081 const KLocale *locale = 0); 00082 00083 private: 00084 Q_DECLARE_PRIVATE(KCalendarSystemHebrew) 00085 }; 00086 00087 #endif // KCALENDARSYSTEMHEBREW_H
KDE 4.7 API Reference