Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: i18n ::
interface XCalendar
Description Access to locale specific calendar systems. Developers Guide OfficeDev - Implementing a New Locale - XCalendar OfficeDev - Overview and Using the API - XCalendar

Methods' Summary
loadDefaultCalendar | Load the default calendar for the given locale.
loadCalendar | Load a specific calendar for the given locale.
getLoadedCalendar | Get the currently loaded Calendar.
getAllCalendars | Returns all available calendars for the given locale.
getUniqueID | Returns the ID string of the loaded calendar, for example, "Gregorian"
setDateTime | Set the date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours.
getDateTime | Get the date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours.
setValue | Set the value of a field.
getValue | Get the value of a field.
isValid | Verify if the date fields set by a combination of XCalendar::setValue() calls is valid. It has a side-effect because it will internally calculate the final value for the date fields
addValue | Add an amount to a field.
getFirstDayOfWeek | returns the first day of a week, one of Weekdays values.
setFirstDayOfWeek | Set the first day of a week, one of Weekdays values.
setMinimumNumberOfDaysForFirstWeek | Set how many days of a week must reside in the first week of a year.
getMinimumNumberOfDaysForFirstWeek | returns how many days of a week must reside in the first week of a year.
getNumberOfMonthsInYear | returns the number of months in a year, e.g. 12
getNumberOfDaysInWeek | returns the number of days in a week, e.g. 7
getMonths | returns a sequence of CalendarItem describing the month names.
getDays | returns a sequence of CalendarItem describing the day names.
getDisplayName | Returns a string (name to display) matching the given parameters.

Methods' Details
loadDefaultCalendar
void
loadDefaultCalendar( | [in] ::com::sun::star::lang::Locale | rLocale );
Description Load the default calendar for the given locale.
loadCalendar
void
loadCalendar( | [in] string | uniqueID,
| [in] ::com::sun::star::lang::Locale | rLocale );
Description Load a specific calendar for the given locale.
getLoadedCalendar
Calendar
getLoadedCalendar();
Description Get the currently loaded Calendar.
getAllCalendars
sequence< string >
getAllCalendars( | [in] ::com::sun::star::lang::Locale | rLocale );
Description Returns all available calendars for the given locale.
getUniqueID
string
getUniqueID();
Description Returns the ID string of the loaded calendar, for example, "Gregorian"
setDateTime
void
setDateTime( | [in] double | nTimeInDays );
Description Set the date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours.
getDateTime
double
getDateTime();
Description Get the date/time as an offset to the start of the calendar at 1-Jan-1970 00:00. The integer part represents the number of days passed since start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours.
setValue
void
setValue( | [in] short | nCalendarFieldIndex,
| [in] short | nValue );
Description Set the value of a field. Parameter nCalendarFieldIndex One of CalendarFieldIndex values. Parameter nValue A value of the allowed range for the field index.
getValue
short
getValue( | [in] short | nCalendarFieldIndex );
Description Get the value of a field. Parameter nCalendarFieldIndex One of CalendarFieldIndex values.
isValid
boolean
isValid();
Description Verify if the date fields set by a combination of XCalendar::setValue() calls is valid. It has a side-effect because it will internally calculate the final value for the date fields
addValue
void
addValue( | [in] short | nCalendarFieldIndex,
| [in] long | nAmount );
Description Add an amount to a field. Parameter nCalendarFieldIndex One of CalendarFieldIndex values. Parameter nAmount The amount to add.
getFirstDayOfWeek
short
getFirstDayOfWeek();
Description returns the first day of a week, one of Weekdays values.
setFirstDayOfWeek
void
setFirstDayOfWeek( | [in] short | nDay );
Description Set the first day of a week, one of Weekdays values.
setMinimumNumberOfDaysForFirstWeek
void
setMinimumNumberOfDaysForFirstWeek( | [in] short | nDays );
Description Set how many days of a week must reside in the first week of a year.
getMinimumNumberOfDaysForFirstWeek
short
getMinimumNumberOfDaysForFirstWeek();
Description returns how many days of a week must reside in the first week of a year.
getNumberOfMonthsInYear
short
getNumberOfMonthsInYear();
Description returns the number of months in a year, e.g. 12
getNumberOfDaysInWeek
short
getNumberOfDaysInWeek();
Description returns the number of days in a week, e.g. 7
getMonths
sequence< CalendarItem >
getMonths();
Description returns a sequence of CalendarItem describing the month names.
getDays
sequence< CalendarItem >
getDays();
Description returns a sequence of CalendarItem describing the day names.
getDisplayName
string
getDisplayName( | [in] short | nCalendarDisplayIndex,
| [in] short | nIdx,
| [in] short | nNameType );
Description Returns a string (name to display) matching the given parameters. Parameter nCalendarDisplayIndex One of CalendarDisplayIndex values Parameter nIdx A value matching the nCalendarDisplayIndex type: CalendarDisplayIndex::AM_PM one of AmPmValue CalendarDisplayIndex::DAY one of Weekdays or a number used as an offset into the corresponding Calendar::Days sequence CalendarDisplayIndex::MONTH one of Months or a number used as an offset into the corresponding Calendar::Months sequence CalendarDisplayIndex::YEAR not used, empty string returned CalendarDisplayIndex::ERA a number used as an offset into the corresponding Calendar::ras sequence CalendarDisplayIndex::GENITIVE_MONTH a number used as an offset into the corresponding Calendar2::enitiveMonth sequence The value should be obtained by a previous call to XCalendar::getValue() with an appropriate CalendarFieldIndex argument. Parameter nNameType A value indicating whether to return the abbreviated or the full name, or the narrow name for some CalendarDisplayIndex values. 0 abbreviated name, e.g. "Jan" 1 full name, e.g. "January" 2 narrow name, e.g. "J" Valid only for CalendarDisplayIndex::DAY, CalendarDisplayIndex::MONTH and CalendarDisplayIndex::GENITIVE_MONTH Since LibreOffice 3.5 This parameter is not used if the nCalendarDisplayIndex argument equals CalendarDisplayIndex::AM_PM

Top of Page

Copyright © 2000, 2013 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.