summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst
blob: d9c6dce10f5b5ed2cec2f11ac0040b4491139a06 (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
``datetime_formatter::ffi``
===========================

.. js:class:: ICU4XDateFormatter

    An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDate` as a string, using some calendar specified at runtime in the locale.

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


    .. js:function:: create_with_length(provider, locale, date_length)

        Creates a new :js:class:`ICU4XDateFormatter` from locale data.

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


    .. js:method:: format_date(value)

        Formats a :js:class:`ICU4XDate` to a string.

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


    .. js:method:: format_iso_date(value)

        Formats a :js:class:`ICU4XIsoDate` to a string.

        Will convert to this formatter's calendar first

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


    .. js:method:: format_datetime(value)

        Formats a :js:class:`ICU4XDateTime` to a string.

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


    .. js:method:: format_iso_datetime(value)

        Formats a :js:class:`ICU4XIsoDateTime` to a string.

        Will convert to this formatter's calendar first

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


.. js:class:: ICU4XDateLength

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


.. js:class:: ICU4XDateTimeFormatter

    An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDateTime` as a string, using some calendar specified at runtime in the locale.

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


    .. js:function:: create_with_lengths(provider, locale, date_length, time_length)

        Creates a new :js:class:`ICU4XDateTimeFormatter` from locale data.

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


    .. js:method:: format_datetime(value)

        Formats a :js:class:`ICU4XDateTime` to a string.

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


    .. js:method:: format_iso_datetime(value)

        Formats a :js:class:`ICU4XIsoDateTime` to a string.

        Will convert to this formatter's calendar first

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


.. js:class:: ICU4XGregorianDateFormatter

    An ICU4X TypedDateFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.

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


    .. js:function:: create_with_length(provider, locale, length)

        Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.

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


    .. js:method:: format_iso_date(value)

        Formats a :js:class:`ICU4XIsoDate` to a string.

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


    .. js:method:: format_iso_datetime(value)

        Formats a :js:class:`ICU4XIsoDateTime` to a string.

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


.. js:class:: ICU4XGregorianDateTimeFormatter

    An ICU4X TypedDateTimeFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.

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


    .. js:function:: create_with_lengths(provider, locale, date_length, time_length)

        Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.

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


    .. js:method:: format_iso_datetime(value)

        Formats a :js:class:`ICU4XIsoDateTime` to a string.

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


.. js:class:: ICU4XTimeFormatter

    An ICU4X TimeFormatter object capable of formatting an :js:class:`ICU4XTime` type (and others) as a string

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


    .. js:function:: create_with_length(provider, locale, length)

        Creates a new :js:class:`ICU4XTimeFormatter` from locale data.

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


    .. js:method:: format_time(value)

        Formats a :js:class:`ICU4XTime` to a string.

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


    .. js:method:: format_datetime(value)

        Formats a :js:class:`ICU4XDateTime` to a string.

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


    .. js:method:: format_iso_datetime(value)

        Formats a :js:class:`ICU4XIsoDateTime` to a string.

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


.. js:class:: ICU4XTimeLength

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