LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XCalendar4 Interface Reference

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

import"XCalendar4.idl";

Inheritance diagram for XCalendar4:
XCalendar3 XExtendedCalendar XCalendar XInterface LocaleCalendar2

Public Member Functions

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

Detailed Description

This interface provides access to locale specific calendar systems.

It is derived from com::sun::star::i18n::XCalendar3 and provides additional methods to set and get the local time.

Since
LibreOffice 5.0

Member Function Documentation

◆ getLocalDateTime()

double getLocalDateTime ( )

Get the local 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.

The actual timezone and daylight saving time offsets effective at the given date and time are considered and added to the UTC time at the calendar.

◆ loadCalendarTZ()

void loadCalendarTZ ( [in] string  uniqueID,
[in] ::com::sun::star::lang::Locale  rLocale,
[in] string  TimeZone 
)

Load a specific calendar for the given locale with a given time zone.

Parameters
uniqueIDthe uniqueID for the calendar. As of 2019-09-25, we can specify ROC, dangi, buddhist, gengou, gregorian, hanja, hanja_yoil, hijri, jewish. If the calendar for the specified uniqueID is not found, gregorian is used.
rLocalethe locale for the calendar
TimeZoneIf empty, the system's time zone is used. Else specified as "Region/City" name like "Europe/Berlin", or a custom time zone ID such as "UTC" or "GMT-8:00".
Since
LibreOffice 6.3

◆ loadDefaultCalendarTZ()

void loadDefaultCalendarTZ ( [in] ::com::sun::star::lang::Locale  rLocale,
[in] string  TimeZone 
)

Load the default calendar for the given locale with a given time zone.

Parameters
rLocalethe locale for the calendar
TimeZoneIf empty, the system's time zone is used. Else specified as "Region/City" name like "Europe/Berlin", or a custom time zone ID such as "UTC" or "GMT-8:00".
Since
LibreOffice 6.3

◆ setLocalDateTime()

void setLocalDateTime ( [in] double  TimeInDays)

Set the local 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.

The actual timezone and daylight saving time offsets effective at the given date and time are considered and subtracted before setting the UTC time at the calendar.


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