org.kde.koala

Class KCalendarSystem

public class KCalendarSystem extends Object implements QtSupport

CalendarSystem abstract class, default derived kde gregorian class and factory class. Provides support for different calendar types for kde calendar widget and related stuff. Derived classes must be created through KCalendarFactory class

Author: Carlos Moro

UNKNOWN: CalendarSystem abstract class, default derived kde gregorian class and factory class.

Constructor Summary
protected KCalendarSystem(Class dummy)
Method Summary
CalendaraddDays(Calendar date, int ndays)
Returns a Calendar object containing a date ndays later.
CalendaraddMonths(Calendar date, int nmonths)
Returns a Calendar object containing a date nmonths later.
CalendaraddYears(Calendar date, int nyears)
Returns a Calendar object containing a date nyears later.
StringcalendarName()
Gets the string representing the calendar
intday(Calendar date)
Gets specific calendar type day number of month for a given date
intdayOfWeek(Calendar date)
Gets specific calendar type number of day of week number for a given date
intdayOfYear(Calendar date)
Gets specific calendar type day number of year for a given date
intdaysInMonth(Calendar date)
Gets specific calendar type number of days in month for a given date
intdaysInYear(Calendar date)
Gets the number of days in date whose years specified.
StringdayString(Calendar pDate, boolean bShort)
Converts a date into a day literal
intdayStringToInteger(String sNum, int[] iLength)
Converts a day literal of a part of a string into a integer starting at the beginning of the string
booleanisLunar()
Gets if the calendar is lunar based
booleanisLunisolar()
Gets if the calendar is lunisolar based
booleanisSolar()
Gets if the calendar is solar based
intmaxValidYear()
Gets the maximum year value supported by specific calendar type algorithms (Calendar, 8000)
intminValidYear()
Gets the first year value supported by specific calendar type algorithms.
intmonth(Calendar date)
Gets specific calendar type month for a given gregorian date
StringmonthName(int month, int year, boolean shortName)
Gets specific calendar type month name for a given month number If an invalid month is specified, null is returned.
StringmonthName(int month, int year)
StringmonthName(Calendar date, boolean shortName)
Gets specific calendar type month name for a given gregorian date
StringmonthName(Calendar date)
StringmonthNamePossessive(int month, int year, boolean shortName)
Returns a string containing the possessive form of the month name.
StringmonthNamePossessive(int month, int year)
StringmonthNamePossessive(Calendar date, boolean shortName)
Returns a string containing the possessive form of the month name.
StringmonthNamePossessive(Calendar date)
intmonthsInYear(Calendar date)
Gets specific calendar type number of month for a given year
StringmonthString(Calendar pDate, boolean bShort)
Converts a date into a month literal
intmonthStringToInteger(String sNum, int[] iLength)
Converts a month literal of a part of a string into a integer starting at the beginning of the string
booleansetYMD(Calendar date, int y, int m, int d)
Changes the date's year, month and day.
StringweekDayName(int weekDay, boolean shortName)
Gets specific calendar type week day name If an invalid week day is specified, null is returned.
StringweekDayName(int weekDay)
StringweekDayName(Calendar date, boolean shortName)
Gets specific calendar type week day name
StringweekDayName(Calendar date)
intweekDayOfPray()
Gets the day of the week traditionaly associated with pray
intweekNumber(Calendar date, int[] yearNum)
Gets specific calendar type week number for a given date
intweekNumber(Calendar date)
intweeksInYear(int year)
Gets the number of weeks in a specified year
intyear(Calendar date)
Gets specific calendar type year for a given gregorian date
StringyearString(Calendar pDate, boolean bShort)
Converts a date into a year literal
intyearStringToInteger(String sNum, int[] iLength)
Converts a year literal of a part of a string into a integer starting at the beginning of the string

Constructor Detail

KCalendarSystem

protected KCalendarSystem(Class dummy)

Method Detail

addDays

public Calendar addDays(Calendar date, int ndays)
Returns a Calendar object containing a date ndays later.

Parameters: date The old date ndays The number of days to add

Returns: The new date

UNKNOWN: Returns a QDate object containing a date ndays later.

addMonths

public Calendar addMonths(Calendar date, int nmonths)
Returns a Calendar object containing a date nmonths later.

Parameters: date The old date nmonths The number of months to add

Returns: The new date

UNKNOWN: Returns a QDate object containing a date nmonths later.

addYears

public Calendar addYears(Calendar date, int nyears)
Returns a Calendar object containing a date nyears later.

Parameters: date The old date nyears The number of years to add

Returns: The new date

UNKNOWN: Returns a QDate object containing a date nyears later.

calendarName

public String calendarName()
Gets the string representing the calendar

UNKNOWN: Gets the string representing the calendar

day

public int day(Calendar date)
Gets specific calendar type day number of month for a given date

Parameters: date gregorian date equivalent to the specific one

Returns: day of the month

UNKNOWN: Gets specific calendar type day number of month for a given date

dayOfWeek

public int dayOfWeek(Calendar date)
Gets specific calendar type number of day of week number for a given date

Parameters: date gregorian date

Returns: day of week

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

dayOfYear

public int dayOfYear(Calendar date)
Gets specific calendar type day number of year for a given date

Parameters: date gregorian date equivalent to the specific one

Returns: day number

UNKNOWN: Gets specific calendar type day number of year for a given date

daysInMonth

public int daysInMonth(Calendar date)
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

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

daysInYear

public int daysInYear(Calendar date)
Gets the number of days in date whose years specified.

Parameters: date Gregorian date equivalent to the specific one

Returns: The number of days in year

UNKNOWN: Gets the number of days in date whose years specified.

dayString

public String dayString(Calendar pDate, boolean bShort)
Converts a date into a day literal

Parameters: pDate The date to convert bShort If the short version of should be used

Returns: The day literal of the date

UNKNOWN: Converts a date into a day literal

dayStringToInteger

public int dayStringToInteger(String sNum, int[] iLength)
Converts a day literal of a part of a string into a integer starting at the beginning of the string

Parameters: sNum The string to parse iLength The number of chars used, and 0 if no valid symbols was found in the string

Returns: An integer corresponding to the day

UNKNOWN: Converts a day literal of a part of a string into a integer starting at the beginning of the string

isLunar

public boolean isLunar()
Gets if the calendar is lunar based

Returns: if the calendar is lunar based

UNKNOWN: Gets if the calendar is lunar based

isLunisolar

public boolean isLunisolar()
Gets if the calendar is lunisolar based

Returns: if the calendar is lunisolar based

UNKNOWN: Gets if the calendar is lunisolar based

isSolar

public boolean isSolar()
Gets if the calendar is solar based

Returns: if the calendar is solar based

UNKNOWN: Gets if the calendar is solar based

maxValidYear

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

Returns: maximum year supported

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

minValidYear

public int minValidYear()
Gets the first year value supported by specific calendar type algorithms.

Returns: first year supported

UNKNOWN: Gets the first year value supported by specific calendar type algorithms.

month

public int month(Calendar date)
Gets specific calendar type month for a given gregorian date

Parameters: date gregorian date

Returns: month number

UNKNOWN: Gets specific calendar type month for a given gregorian date

monthName

public String monthName(int month, int year, boolean shortName)
Gets specific calendar type month name for a given month number If an invalid month is specified, null is returned.

Parameters: month The month number year The year the month belongs to shortName Specifies if the short month name should be used

Returns: The name of the month

UNKNOWN: Gets specific calendar type month name for a given month number If an invalid month is specified, String.null is returned.

monthName

public String monthName(int month, int year)

monthName

public String monthName(Calendar date, boolean shortName)
Gets specific calendar type month name for a given gregorian date

Parameters: date Gregorian date shortName Specifies if the short month name should be used

Returns: The name of the month

UNKNOWN: Gets specific calendar type month name for a given gregorian date

monthName

public String monthName(Calendar date)

monthNamePossessive

public String monthNamePossessive(int month, int year, boolean shortName)
Returns a string containing the possessive form of the month name. ("of January", "of February", etc.) It's needed in long format dates in some languages. If an invalid month is specified, null is returned.

Parameters: month The month number year The year the month belongs to shortName Specifies if the short month name should be used

Returns: The possessive form of the name of the month

UNKNOWN: Returns a string containing the possessive form of the month name.

monthNamePossessive

public String monthNamePossessive(int month, int year)

monthNamePossessive

public String monthNamePossessive(Calendar date, boolean shortName)
Returns a string containing the possessive form of the month name. ("of January", "of February", etc.) It's needed in long format dates in some languages.

Parameters: date Gregorian date shortName Specifies if the short month name should be used

Returns: The possessive form of the name of the month

UNKNOWN: Returns a string containing the possessive form of the month name.

monthNamePossessive

public String monthNamePossessive(Calendar date)

monthsInYear

public int monthsInYear(Calendar date)
Gets specific calendar type number of month for a given year

Parameters: date The date whose year to use

Returns: The number of months in that year

UNKNOWN: Gets specific calendar type number of month for a given year

monthString

public String monthString(Calendar pDate, boolean bShort)
Converts a date into a month literal

Parameters: pDate The date to convert bShort If the short version of should be used

Returns: The month literal of the date

UNKNOWN: Converts a date into a month literal

monthStringToInteger

public int monthStringToInteger(String sNum, int[] iLength)
Converts a month literal of a part of a string into a integer starting at the beginning of the string

Parameters: sNum The string to parse iLength The number of chars used, and 0 if no valid symbols was found in the string

Returns: An integer corresponding to the month

UNKNOWN: Converts a month literal of a part of a string into a integer starting at the beginning of the string

setYMD

public boolean setYMD(Calendar date, int y, int m, int d)
Changes the date's year, month and day. The range of the year, month and day depends on which calendar is being used.

Parameters: date Date to change y Year m Month number d Day of month

Returns: true if the date is valid; otherwise returns false.

UNKNOWN: Changes the date's year, month and day.

weekDayName

public String weekDayName(int weekDay, boolean shortName)
Gets specific calendar type week day name If an invalid week day is specified, null is returned.

Parameters: weekDay number of day in week (1 . Monday) shortName short or complete day name

Returns: day name

UNKNOWN: Gets specific calendar type week day name If an invalid week day is specified, String.null is returned.

weekDayName

public String weekDayName(int weekDay)

weekDayName

public String weekDayName(Calendar date, boolean shortName)
Gets specific calendar type week day name

Parameters: date the date shortName short or complete day name

Returns: day name

UNKNOWN: Gets specific calendar type week day name

weekDayName

public String weekDayName(Calendar date)

weekDayOfPray

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

Returns: day number

UNKNOWN: Gets the day of the week traditionaly associated with pray

weekNumber

public int weekNumber(Calendar date, int[] yearNum)
Gets specific calendar type week number for a given date

Parameters: date gregorian date yearNum The year the date belongs to

Returns: week number

UNKNOWN: Gets specific calendar type week number for a given date

weekNumber

public int weekNumber(Calendar date)

weeksInYear

public int weeksInYear(int year)
Gets the number of weeks in a specified year

Parameters: year the year

Returns: number of weeks in year

UNKNOWN: Gets the number of weeks in a specified year

year

public int year(Calendar date)
Gets specific calendar type year for a given gregorian date

Parameters: date gregorian date

Returns: year

UNKNOWN: Gets specific calendar type year for a given gregorian date

yearString

public String yearString(Calendar pDate, boolean bShort)
Converts a date into a year literal

Parameters: pDate The date to convert bShort If the short version of should be used

Returns: The year literal of the date

UNKNOWN: Converts a date into a year literal

yearStringToInteger

public int yearStringToInteger(String sNum, int[] iLength)
Converts a year literal of a part of a string into a integer starting at the beginning of the string

Parameters: sNum The string to parse iLength The number of chars used, and 0 if no valid symbols was found in the string

Returns: An integer corresponding to the year

UNKNOWN: Converts a year literal of a part of a string into a integer starting at the beginning of the string