LibreOffice: XExtendedCalendar Interface Reference

LibreOffice LibreOffice 25.8 SDK API Reference

Loading...
Searching...
No Matches
XExtendedCalendar Interface Referencepublished

This interface provides access to locale specific calendar systems. More...

`import "XExtendedCalendar.idl";`

Inheritance diagram for XExtendedCalendar:

## Public Member Functions
string | getDisplayString ([in] long nCalendarDisplayCode, [in] short nNativeNumberMode)
| Returns a string (number or name to display) matching the given code constant.
Public Member Functions inherited from XCalendar
void | loadDefaultCalendar ([in] ::com::sun::star::lang::Locale rLocale)
| Load the default calendar for the given locale.
void | loadCalendar ([in] string uniqueID, [in] ::com::sun::star::lang::Locale rLocale)
| Load a specific calendar for the given locale.
Calendar | getLoadedCalendar ()
| Get the currently loaded Calendar.
sequence< string > | getAllCalendars ([in] ::com::sun::star::lang::Locale rLocale)
| Returns all available calendars for the given locale.
string | getUniqueID ()
| Returns the ID string of the loaded calendar, for example, "Gregorian".
void | setDateTime ([in] double nTimeInDays)
| Set the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00.
double | getDateTime ()
| Get the UTC date/time as an offset to the start of the calendar at 1-Jan-1970 00:00.
void | setValue ([in] short nCalendarFieldIndex, [in] short nValue)
| Set the value of a field.
short | getValue ([in] short nCalendarFieldIndex)
| Get the value of a field.
boolean | isValid ()
| Verify if the date fields set by a combination of XCalendar::setValue() calls is valid.
void | addValue ([in] short nCalendarFieldIndex, [in] long nAmount)
| Add an amount to a field.
short | getFirstDayOfWeek ()
| returns the first day of a week, one of Weekdays values.
void | setFirstDayOfWeek ([in] short nDay)
| Set the first day of a week, one of Weekdays values.
void | setMinimumNumberOfDaysForFirstWeek ([in] short nDays)
| Set how many days of a week must reside in the first week of a year.
short | getMinimumNumberOfDaysForFirstWeek ()
| returns how many days of a week must reside in the first week of a year.
short | getNumberOfMonthsInYear ()
| returns the number of months in a year, e.g. 12
short | getNumberOfDaysInWeek ()
| returns the number of days in a week, e.g. 7
sequence< CalendarItem > | getMonths ()
| returns a sequence of CalendarItem describing the month names.
sequence< CalendarItem > | getDays ()
| returns a sequence of CalendarItem describing the day names.
string | getDisplayName ([in] short nCalendarDisplayIndex, [in] short nIdx, [in] short nNameType)
| Returns a string (name to display) matching the given parameters.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

This interface provides access to locale specific calendar systems.

It is derived from com::sun::star::i18n::XCalendar and provides additional functionality to display parts of the date currently set at the calendar.

Since
  OOo 1.1.2

Developers Guide
  Office Development - Overview and Using the API - XExtendedCalendar

## Member Function Documentation

## ◆ getDisplayString()

string getDisplayString | ( | [in] long | nCalendarDisplayCode,
|  | [in] short | nNativeNumberMode )

Returns a string (number or name to display) matching the given code constant.

Note that the string returned depends completely on the locale's calendar. It is not predictable if the string will be numeric or a name, or if in case it returns a numeric string how many digits that will have. For example, a short year display string will normally be two digits with a Gregorian calendar, but with a Jewish calendar it will have three digits.

Parameters

  nCalendarDisplayCode | One of CalendarDisplayCode
  nNativeNumberMode | One of NativeNumberMode. This argument designates the basic transliteration mode as if specified for the year representation. However, depending on the locale, different conversions for year and month, for example, may be chosen internally. This is beyond the user's control and depends on locale specific conventions of how a date is assembled.

The documentation for this interface was generated from the following file:

- com/sun/star/i18n/XExtendedCalendar.idl