calendarsystem Library API Documentation

KCalendarSystemHijri Class Reference

Hijri calendar type implementation. More...

#include <kcalendarsystemhijri.h>

Inheritance diagram for KCalendarSystemHijri:

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.

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 month (const QDate &date)
 Gets specific calendar type month for a given gregorian date.

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

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

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


Detailed Description

Hijri calendar type implementation.

Definition at line 22 of file kcalendarsystemhijri.h.


Member Function Documentation

QString KCalendarSystemHijri::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 28 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::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 40 of file kcalendarsystemhijri.cpp.

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

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

QString KCalendarSystemHijri::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 52 of file kcalendarsystemhijri.cpp.

References QDate::day(), QDate::month(), QString::number(), and QDate::year().

void KCalendarSystemHijri::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 63 of file kcalendarsystemhijri.cpp.

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

void KCalendarSystemHijri::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 92 of file kcalendarsystemhijri.cpp.

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

void KCalendarSystemHijri::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 122 of file kcalendarsystemhijri.cpp.

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

void KCalendarSystemHijri::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 144 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::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 166 of file kcalendarsystemhijri.cpp.

QString KCalendarSystemHijri::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 172 of file kcalendarsystemhijri.cpp.

void KCalendarSystemHijri::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 179 of file kcalendarsystemhijri.cpp.

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

void KCalendarSystemHijri::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 200 of file kcalendarsystemhijri.cpp.

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

QDate KCalendarSystemHijri::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 221 of file kcalendarsystemhijri.cpp.

References day(), month(), QDate::setYMD(), QStringList::split(), QString::toInt(), QDate::year(), and year().

QString KCalendarSystemHijri::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 252 of file kcalendarsystemhijri.cpp.

int KCalendarSystemHijri::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 260 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::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 272 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::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 296 of file kcalendarsystemhijri.cpp.

int KCalendarSystemHijri::maxValidYear  )  [virtual]
 

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

Returns:
maximum year supported

Implements KCalendarSystem.

Definition at line 315 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::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 326 of file kcalendarsystemhijri.cpp.

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

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

int KCalendarSystemHijri::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 335 of file kcalendarsystemhijri.cpp.

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

Referenced by parseDate().

int KCalendarSystemHijri::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 344 of file kcalendarsystemhijri.cpp.

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

int KCalendarSystemHijri::weekDayOfPray  )  [virtual]
 

Gets the day of the week traditionaly associated with pray.

Returns:
day number

Implements KCalendarSystem.

Definition at line 359 of file kcalendarsystemhijri.cpp.

void KCalendarSystemHijri::printType  )  [virtual]
 

Just a small debugging test ;).

Implements KCalendarSystem.

Definition at line 362 of file kcalendarsystemhijri.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