summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/cpp/docs/source/time_ffi.rst
blob: 173a309e2422718e6ee4fe5bdbd13b749b3386fe (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
``time::ffi``
=============

.. cpp:class:: ICU4XTime

    An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond

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


    .. cpp:function:: static diplomat::result<ICU4XTime, ICU4XError> create(uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond)

        Creates a new :cpp:class:`ICU4XTime` given field values

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


    .. cpp:function:: static diplomat::result<ICU4XTime, ICU4XError> create_midnight()

        Creates a new :cpp:class:`ICU4XTime` representing midnight (00:00.000).

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


    .. cpp:function:: uint8_t hour() const

        Returns the hour in this time

        See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.


    .. cpp:function:: uint8_t minute() const

        Returns the minute in this time

        See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.


    .. cpp:function:: uint8_t second() const

        Returns the second in this time

        See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.


    .. cpp:function:: uint32_t nanosecond() const

        Returns the nanosecond in this time

        See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.