• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kcalendarsystemgregorian.h
1 /*
2  Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
3  Copyright (c) 2002 Hans Petter Bieker <bieker@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KCALENDARSYSTEMGREGORIAN_H
22 #define KCALENDARSYSTEMGREGORIAN_H
23 
24 #include <tqdatetime.h>
25 #include <tqstring.h>
26 
27 #include "kcalendarsystem.h"
28 
29 class KCalendarSystemGregorianPrivate;
30 
43 class KDECORE_EXPORT KCalendarSystemGregorian: public KCalendarSystem
44 {
45 public:
47  KCalendarSystemGregorian (const KLocale * locale = 0);
48  virtual ~KCalendarSystemGregorian ();
49 
50  virtual int year (const TQDate & date) const;
51  virtual int month (const TQDate & date) const;
52  virtual int day (const TQDate & date) const;
53  virtual int dayOfWeek (const TQDate & date) const;
54  virtual int dayOfYear (const TQDate & date) const;
55 
56  virtual bool setYMD(TQDate & date, int y, int m, int d) const;
57 
58  virtual TQDate addYears(const TQDate & date, int nyears) const;
59  virtual TQDate addMonths(const TQDate & date, int nmonths) const;
60  virtual TQDate addDays(const TQDate & date, int ndays) const;
61 
62  virtual int monthsInYear (const TQDate & date) const;
63 
64  virtual int daysInYear (const TQDate & date) const;
65  virtual int daysInMonth (const TQDate & date) const;
66  virtual int weeksInYear(int year) const;
67  virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
68 
69  virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
70 
71  virtual TQString monthName (int month, int year, bool shortName = false) const;
72  virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
73  virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
74  virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
75  virtual TQString weekDayName (int weekDay, bool shortName = false) const;
76  virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
77 
78  virtual int minValidYear () const;
79  virtual int maxValidYear () const;
80  virtual int weekDayOfPray () const;
81 
82  virtual TQString calendarName() const;
83 
84  virtual bool isLunar() const;
85  virtual bool isLunisolar() const;
86  virtual bool isSolar() const;
87 
88 private:
89  KCalendarSystemGregorianPrivate * d;
90 };
91 
92 #endif
KCalendarSystem::monthName
virtual TQString monthName(int month, int year, bool shortName=false) const =0
Gets specific calendar type month name for a given month number If an invalid month is specified...
KCalendarSystem::addMonths
virtual TQDate addMonths(const TQDate &date, int nmonths) const =0
Returns a TQDate object containing a date nmonths later.
KCalendarSystem::addYears
virtual TQDate addYears(const TQDate &date, int nyears) const =0
Returns a TQDate object containing a date nyears later.
KCalendarSystem::maxValidYear
virtual int maxValidYear() const =0
Gets the maximum year value supported by specific calendar type algorithms (TQDate, 8000)
KCalendarSystem::year
virtual int year(const TQDate &date) const =0
Gets specific calendar type year for a given gregorian date.
KCalendarSystem::dayOfWeek
virtual int dayOfWeek(const TQDate &date) const =0
Gets specific calendar type number of day of week number for a given date.
KCalendarSystem::monthsInYear
virtual int monthsInYear(const TQDate &date) const =0
Gets specific calendar type number of month for a given year.
KCalendarSystem::isLunar
virtual bool isLunar() const =0
Gets if the calendar is lunar based.
KCalendarSystem::weekNumber
virtual int weekNumber(const TQDate &date, int *yearNum=0) const =0
Gets specific calendar type week number for a given date.
KCalendarSystem::yearStringToInteger
virtual int yearStringToInteger(const TQString &sNum, int &iLength) const
Converts a year literal of a part of a string into a integer starting at the beginning of the string...
Definition: kcalendarsystem.cpp:114
KCalendarSystem
CalendarSystem abstract class, default derived kde gregorian class and factory class.
Definition: kcalendarsystem.h:42
KCalendarSystem::daysInMonth
virtual int daysInMonth(const TQDate &date) const =0
Gets specific calendar type number of days in month for a given date.
KCalendarSystem::dayOfYear
virtual int dayOfYear(const TQDate &date) const =0
Gets specific calendar type day number of year for a given date.
KCalendarSystem::daysInYear
virtual int daysInYear(const TQDate &date) const =0
Gets the number of days in date whose years specified.
KCalendarSystem::month
virtual int month(const TQDate &date) const =0
Gets specific calendar type month for a given gregorian date.
KCalendarSystem::weekDayName
virtual TQString weekDayName(int weekDay, bool shortName=false) const =0
Gets specific calendar type week day name If an invalid week day is specified, TQString::null is retu...
Definition: kcalendarsystem.cpp:119
KCalendarSystem::monthNamePossessive
virtual TQString monthNamePossessive(int month, int year, bool shortName=false) const =0
Returns a string containing the possessive form of the month name.
KCalendarSystem::weeksInYear
virtual int weeksInYear(int year) const =0
Gets the number of weeks in a specified year.
KCalendarSystem::day
virtual int day(const TQDate &date) const =0
Gets specific calendar type day number of month for a given date.
KCalendarSystem::minValidYear
virtual int minValidYear() const =0
Gets the first year value supported by specific calendar type algorithms.
KLocale
KLocale provides support for country specific stuff like the national language.
Definition: klocale.h:124
KCalendarSystem::isLunisolar
virtual bool isLunisolar() const =0
Gets if the calendar is lunisolar based.
KCalendarSystem::weekDayOfPray
virtual int weekDayOfPray() const =0
Gets the day of the week traditionaly associated with pray.
KCalendarSystem::addDays
virtual TQDate addDays(const TQDate &date, int ndays) const =0
Returns a TQDate object containing a date ndays later.
KCalendarSystem::isSolar
virtual bool isSolar() const =0
Gets if the calendar is solar based.
KCalendarSystem::calendarName
virtual TQString calendarName() const =0
Gets the string representing the calendar.
KCalendarSystem::setYMD
virtual bool setYMD(TQDate &date, int y, int m, int d) const =0
Changes the date&#39;s year, month and day.

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |