calendarsystem Library API Documentation

KCalendarSystemGregorian Class Reference

Default derived, gregorian calendar class. More...

#include <kcalendarsystem.h>

Inheritance diagram for KCalendarSystemGregorian:

KCalendarSystem List of all members.

Public Member Functions

QString monthName (const QDate &date, bool shortName)
 Gets specific calendar type month name for a given gregorian date.

int year (const QDate &date)
 Gets specific calendar type year for a given gregorian date.

int month (const QDate &date)
 Gets specific calendar type month for a given gregorian date.

QString formatDate (const QDate &date)
 Gets specific calendar type day/month/year formatted text date for a given gregorian date.

void nextMonthDate (QDate &date)
 Gets specific calendar type (its gregorian equivalent) next month date for a given gregorian date.

void previousMonthDate (QDate &date)
 Gets specific calendar type (its gregorian equivalent) previous month date for a given gregorian date.

void nextYearDate (QDate &date)
 Gets specific calendar type next year date (its gregorian equivalent) for a given gregorian date.

void previousYearDate (QDate &date)
 Gets specific calendar type (its gregorian equivalent) previous year date for a given gregorian date.

int monthsInYear (int year)
 Gets specific calendar type number of month for a given year.

QString monthName (int month)
 Gets specific calendar type month name.

void constructDateInMonth (QDate &date, int month)
 Given a month, construct a valid date in given date's year.

void constructDateInYear (QDate &date, int year)
 Given a year, construct a valid date.

QDate parseDate (QString text)
 Convert a formatted day/month/year string to a valid date object.

QString weekDayName (int col, bool shortName)
 Gets specific calendar type week day name.

int dayOfTheWeek (const QDate &date)
 Gets specific calendar type number of day of week number for a given date.

int numberOfDaysInMonth (const QDate &date)
 Gets specific calendar type number of days in month for a given date.

int numberOfDaysPrevMonth (const QDate &date)
 Gets specific calendar type number of days in previous month for a given date.

int maxValidYear ()
 Gets the maximum year value supported by specific calendar type algorithms (QDate, 8000).

int day (const QDate &date)
 Gets specific calendar type day number in month for a given date.

int numberOfDayInYear (const QDate &date)
 Gets specific calendar type day number in year for a given date.

virtual int weekDayOfPray ()
 Gets the day of the week traditionaly associated with pray.

void printType ()
 Just a small debugging test ;).


Detailed Description

Default derived, gregorian calendar class.

Definition at line 198 of file kcalendarsystem.h.


Member Function Documentation

QString KCalendarSystemGregorian::monthName const QDate date,
bool  shortName
[virtual]
 

Gets specific calendar type month name for a given gregorian date.

Parameters:
date gregorian date
Returns:
month name

Implements KCalendarSystem.

Definition at line 27 of file kcalendarsystem.cpp.

References QDate::month().

int KCalendarSystemGregorian::year const QDate date  )  [virtual]
 

Gets specific calendar type year for a given gregorian date.

Parameters:
date gregorian date
Returns:
year

Implements KCalendarSystem.

Definition at line 43 of file kcalendarsystem.cpp.

References QDate::year().

int KCalendarSystemGregorian::month const QDate date  )  [virtual]
 

Gets specific calendar type month for a given gregorian date.

Parameters:
date gregorian date
Returns:
month

Implements KCalendarSystem.

Definition at line 197 of file kcalendarsystem.cpp.

References QDate::month().

QString KCalendarSystemGregorian::formatDate const QDate date  )  [virtual]
 

Gets specific calendar type day/month/year formatted text date for a given gregorian date.

Parameters:
date gregorian date
Returns:
formatted text date

Implements KCalendarSystem.

Definition at line 35 of file kcalendarsystem.cpp.

void KCalendarSystemGregorian::nextMonthDate QDate date  )  [virtual]
 

Gets specific calendar type (its gregorian equivalent) next month date for a given gregorian date.

Parameters:
date date to be +1 month updated

Implements KCalendarSystem.

Definition at line 49 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::month(), QDate::setYMD(), and QDate::year().

void KCalendarSystemGregorian::previousMonthDate QDate date  )  [virtual]
 

Gets specific calendar type (its gregorian equivalent) previous month date for a given gregorian date.

Parameters:
date date to be -1 month updated

Implements KCalendarSystem.

Definition at line 66 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::month(), QDate::setYMD(), and QDate::year().

void KCalendarSystemGregorian::nextYearDate QDate date  )  [virtual]
 

Gets specific calendar type next year date (its gregorian equivalent) for a given gregorian date.

Parameters:
date date to be +1 year updated

Implements KCalendarSystem.

Definition at line 85 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::month(), QDate::setYMD(), and QDate::year().

void KCalendarSystemGregorian::previousYearDate QDate date  )  [virtual]
 

Gets specific calendar type (its gregorian equivalent) previous year date for a given gregorian date.

Parameters:
date date to be -1 year updated

Implements KCalendarSystem.

Definition at line 98 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::month(), QDate::setYMD(), and QDate::year().

int KCalendarSystemGregorian::monthsInYear int  year  )  [virtual]
 

Gets specific calendar type number of month for a given year.

Parameters:
year the year year
Returns:
number of months in that year

Implements KCalendarSystem.

Definition at line 111 of file kcalendarsystem.cpp.

QString KCalendarSystemGregorian::monthName int  month  )  [virtual]
 

Gets specific calendar type month name.

Parameters:
month number of month in year
Returns:
month name

Implements KCalendarSystem.

Definition at line 118 of file kcalendarsystem.cpp.

void KCalendarSystemGregorian::constructDateInMonth QDate date,
int  month
[virtual]
 

Given a month, construct a valid date in given date's year.

Parameters:
date date that indicates the year and whose value is updated
month month number which resulting date belongs to

Implements KCalendarSystem.

Definition at line 126 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::setYMD(), and QDate::year().

void KCalendarSystemGregorian::constructDateInYear QDate date,
int  year
[virtual]
 

Given a year, construct a valid date.

Parameters:
date date whose value is updated
year year of the new date

Implements KCalendarSystem.

Definition at line 137 of file kcalendarsystem.cpp.

References QDate::day(), day(), QDate::daysInMonth(), QDate::month(), and QDate::setYMD().

QDate KCalendarSystemGregorian::parseDate QString  text  )  [virtual]
 

Convert a formatted day/month/year string to a valid date object.

Parameters:
text day/month/year string
Returns:
valid parsed date object

Implements KCalendarSystem.

Definition at line 149 of file kcalendarsystem.cpp.

QString KCalendarSystemGregorian::weekDayName int  col,
bool  shortName
[virtual]
 

Gets specific calendar type week day name.

Parameters:
col number of day in week (1 -> Monday)
shortName short or complete day name
Returns:
day name

Implements KCalendarSystem.

Definition at line 156 of file kcalendarsystem.cpp.

int KCalendarSystemGregorian::dayOfTheWeek const QDate date  )  [virtual]
 

Gets specific calendar type number of day of week number for a given date.

Parameters:
date gregorian date
Returns:
day of week

Implements KCalendarSystem.

Definition at line 163 of file kcalendarsystem.cpp.

References QDate::dayOfWeek().

int KCalendarSystemGregorian::numberOfDaysInMonth const QDate date  )  [virtual]
 

Gets specific calendar type number of days in month for a given date.

Parameters:
date gregorian date
Returns:
number of days for month in date

Implements KCalendarSystem.

Definition at line 168 of file kcalendarsystem.cpp.

References QDate::daysInMonth().

int KCalendarSystemGregorian::numberOfDaysPrevMonth const QDate date  )  [virtual]
 

Gets specific calendar type number of days in previous month for a given date.

Parameters:
date gregorian date
Returns:
number of days for previous month of date

Implements KCalendarSystem.

Definition at line 174 of file kcalendarsystem.cpp.

References QDate::daysInMonth(), QDate::month(), QDate::setYMD(), and QDate::year().

int KCalendarSystemGregorian::maxValidYear  )  [virtual]
 

Gets the maximum year value supported by specific calendar type algorithms (QDate, 8000).

Returns:
maximum year supported

Implements KCalendarSystem.

Definition at line 187 of file kcalendarsystem.cpp.

int KCalendarSystemGregorian::day const QDate date  )  [virtual]
 

Gets specific calendar type day number in month for a given date.

Parameters:
date gregorian date equivalent to the specific one
Returns:
day number

Implements KCalendarSystem.

Definition at line 192 of file kcalendarsystem.cpp.

References QDate::day().

Referenced by constructDateInMonth(), constructDateInYear(), nextMonthDate(), nextYearDate(), previousMonthDate(), and previousYearDate().

int KCalendarSystemGregorian::numberOfDayInYear const QDate date  )  [virtual]
 

Gets specific calendar type day number in year for a given date.

Parameters:
date gregorian date equivalent to the specific one
Returns:
day number

Implements KCalendarSystem.

Definition at line 202 of file kcalendarsystem.cpp.

References QDate::dayOfYear().

int KCalendarSystemGregorian::weekDayOfPray  )  [virtual]
 

Gets the day of the week traditionaly associated with pray.

Returns:
day number

Implements KCalendarSystem.

Definition at line 207 of file kcalendarsystem.cpp.

void KCalendarSystemGregorian::printType  )  [virtual]
 

Just a small debugging test ;).

Implements KCalendarSystem.

Definition at line 211 of file kcalendarsystem.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:08 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001