summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/cpp/docs/source/timezone_formatter_ffi.rst
blob: 38e2107b41c4ce60014b5262bd297f92d968cf94 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
``timezone_formatter::ffi``
===========================

.. cpp:enum-struct:: ICU4XIsoTimeZoneFormat

    See the `Rust documentation for IsoFormat <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html>`__ for more information.


    .. cpp:enumerator:: Basic

    .. cpp:enumerator:: Extended

    .. cpp:enumerator:: UtcBasic

    .. cpp:enumerator:: UtcExtended

.. cpp:enum-struct:: ICU4XIsoTimeZoneMinuteDisplay

    See the `Rust documentation for IsoMinutes <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html>`__ for more information.


    .. cpp:enumerator:: Required

    .. cpp:enumerator:: Optional

.. cpp:struct:: ICU4XIsoTimeZoneOptions

    .. cpp:member:: ICU4XIsoTimeZoneFormat format

    .. cpp:member:: ICU4XIsoTimeZoneMinuteDisplay minutes

    .. cpp:member:: ICU4XIsoTimeZoneSecondDisplay seconds

.. cpp:enum-struct:: ICU4XIsoTimeZoneSecondDisplay

    See the `Rust documentation for IsoSeconds <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html>`__ for more information.


    .. cpp:enumerator:: Optional

    .. cpp:enumerator:: Never

.. cpp:class:: ICU4XTimeZoneFormatter

    An ICU4X TimeZoneFormatter object capable of formatting an :cpp:class:`ICU4XCustomTimeZone` type (and others) as a string

    See the `Rust documentation for TimeZoneFormatter <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html>`__ for more information.


    .. cpp:function:: static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_localized_gmt_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale)

        Creates a new :cpp:class:`ICU4XTimeZoneFormatter` from locale data.

        Uses localized GMT as the fallback format.

        See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.

        Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__


    .. cpp:function:: static diplomat::result<ICU4XTimeZoneFormatter, ICU4XError> create_with_iso_8601_fallback(const ICU4XDataProvider& provider, const ICU4XLocale& locale, ICU4XIsoTimeZoneOptions options)

        Creates a new :cpp:class:`ICU4XTimeZoneFormatter` from locale data.

        Uses ISO-8601 as the fallback format.

        See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.

        Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_non_location_long(const ICU4XDataProvider& provider)

        Loads generic non-location long format. Example: "Pacific Time"

        See the `Rust documentation for include_generic_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_non_location_short(const ICU4XDataProvider& provider)

        Loads generic non-location short format. Example: "PT"

        See the `Rust documentation for include_generic_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_specific_non_location_long(const ICU4XDataProvider& provider)

        Loads specific non-location long format. Example: "Pacific Standard Time"

        See the `Rust documentation for include_specific_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_specific_non_location_short(const ICU4XDataProvider& provider)

        Loads specific non-location short format. Example: "PST"

        See the `Rust documentation for include_specific_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_generic_location_format(const ICU4XDataProvider& provider)

        Loads generic location format. Example: "Los Angeles Time"

        See the `Rust documentation for include_generic_location_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> include_localized_gmt_format()

        Loads localized GMT format. Example: "GMT-07:00"

        See the `Rust documentation for include_localized_gmt_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format>`__ for more information.


    .. cpp:function:: diplomat::result<std::monostate, ICU4XError> load_iso_8601_format(ICU4XIsoTimeZoneOptions options)

        Loads ISO-8601 format. Example: "-07:00"

        See the `Rust documentation for include_iso_8601_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format>`__ for more information.


    .. cpp:function:: template<typename W> diplomat::result<std::monostate, ICU4XError> format_custom_time_zone_to_writeable(const ICU4XCustomTimeZone& value, W& write) const

        Formats a :cpp:class:`ICU4XCustomTimeZone` to a string.

        See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.

        See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.


    .. cpp:function:: diplomat::result<std::string, ICU4XError> format_custom_time_zone(const ICU4XCustomTimeZone& value) const

        Formats a :cpp:class:`ICU4XCustomTimeZone` to a string.

        See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.

        See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.