summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/i18n/XCalendar4.idl
blob: a062b4e587fe0747f15bddb45515fa52cf8bb861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */


module com { module sun { module star { module i18n {



/** This interface provides access to locale specific calendar
    systems.

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

    @since LibreOffice 5.0
 */
interface XCalendar4 : com::sun::star::i18n::XCalendar3
{
    /** 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.
     */
    void    setLocalDateTime( [in] double TimeInDays );

    /** 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.
     */
    double  getLocalDateTime();

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

        @param  rLocale
                the locale for the calendar
        @param  TimeZone
                If 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
     */
    void    loadDefaultCalendarTZ( [in] ::com::sun::star::lang::Locale rLocale, [in] string TimeZone );

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

        @param  uniqueID
                the 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.
        @param  rLocale
                the locale for the calendar
        @param  TimeZone
                If 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
     */
    void    loadCalendarTZ( [in] string uniqueID,
                            [in] ::com::sun::star::lang::Locale rLocale,
                            [in] string TimeZone );

};

}; }; }; };

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */