DateFormatter.h (8775B)
1 #ifndef DateFormatter_H 2 #define DateFormatter_H 3 4 #include <stdio.h> 5 #include <stdint.h> 6 #include <stddef.h> 7 #include <stdbool.h> 8 #include "diplomat_runtime.h" 9 10 #include "DataProvider.d.h" 11 #include "Date.d.h" 12 #include "DateTimeAlignment.d.h" 13 #include "DateTimeFormatterLoadError.d.h" 14 #include "DateTimeLength.d.h" 15 #include "DateTimeMismatchedCalendarError.d.h" 16 #include "IsoDate.d.h" 17 #include "Locale.d.h" 18 #include "YearStyle.d.h" 19 20 #include "DateFormatter.d.h" 21 22 23 24 25 26 27 typedef struct icu4x_DateFormatter_create_d_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_d_mv1_result; 28 icu4x_DateFormatter_create_d_mv1_result icu4x_DateFormatter_create_d_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 29 30 typedef struct icu4x_DateFormatter_create_d_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_d_with_provider_mv1_result; 31 icu4x_DateFormatter_create_d_with_provider_mv1_result icu4x_DateFormatter_create_d_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 32 33 typedef struct icu4x_DateFormatter_create_md_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_md_mv1_result; 34 icu4x_DateFormatter_create_md_mv1_result icu4x_DateFormatter_create_md_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 35 36 typedef struct icu4x_DateFormatter_create_md_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_md_with_provider_mv1_result; 37 icu4x_DateFormatter_create_md_with_provider_mv1_result icu4x_DateFormatter_create_md_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 38 39 typedef struct icu4x_DateFormatter_create_ymd_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ymd_mv1_result; 40 icu4x_DateFormatter_create_ymd_mv1_result icu4x_DateFormatter_create_ymd_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 41 42 typedef struct icu4x_DateFormatter_create_ymd_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ymd_with_provider_mv1_result; 43 icu4x_DateFormatter_create_ymd_with_provider_mv1_result icu4x_DateFormatter_create_ymd_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 44 45 typedef struct icu4x_DateFormatter_create_de_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_de_mv1_result; 46 icu4x_DateFormatter_create_de_mv1_result icu4x_DateFormatter_create_de_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 47 48 typedef struct icu4x_DateFormatter_create_de_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_de_with_provider_mv1_result; 49 icu4x_DateFormatter_create_de_with_provider_mv1_result icu4x_DateFormatter_create_de_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 50 51 typedef struct icu4x_DateFormatter_create_mde_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_mde_mv1_result; 52 icu4x_DateFormatter_create_mde_mv1_result icu4x_DateFormatter_create_mde_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 53 54 typedef struct icu4x_DateFormatter_create_mde_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_mde_with_provider_mv1_result; 55 icu4x_DateFormatter_create_mde_with_provider_mv1_result icu4x_DateFormatter_create_mde_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 56 57 typedef struct icu4x_DateFormatter_create_ymde_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ymde_mv1_result; 58 icu4x_DateFormatter_create_ymde_mv1_result icu4x_DateFormatter_create_ymde_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 59 60 typedef struct icu4x_DateFormatter_create_ymde_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ymde_with_provider_mv1_result; 61 icu4x_DateFormatter_create_ymde_with_provider_mv1_result icu4x_DateFormatter_create_ymde_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 62 63 typedef struct icu4x_DateFormatter_create_e_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_e_mv1_result; 64 icu4x_DateFormatter_create_e_mv1_result icu4x_DateFormatter_create_e_mv1(const Locale* locale, DateTimeLength_option length); 65 66 typedef struct icu4x_DateFormatter_create_e_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_e_with_provider_mv1_result; 67 icu4x_DateFormatter_create_e_with_provider_mv1_result icu4x_DateFormatter_create_e_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length); 68 69 typedef struct icu4x_DateFormatter_create_m_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_m_mv1_result; 70 icu4x_DateFormatter_create_m_mv1_result icu4x_DateFormatter_create_m_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 71 72 typedef struct icu4x_DateFormatter_create_m_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_m_with_provider_mv1_result; 73 icu4x_DateFormatter_create_m_with_provider_mv1_result icu4x_DateFormatter_create_m_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment); 74 75 typedef struct icu4x_DateFormatter_create_ym_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ym_mv1_result; 76 icu4x_DateFormatter_create_ym_mv1_result icu4x_DateFormatter_create_ym_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 77 78 typedef struct icu4x_DateFormatter_create_ym_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_ym_with_provider_mv1_result; 79 icu4x_DateFormatter_create_ym_with_provider_mv1_result icu4x_DateFormatter_create_ym_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 80 81 typedef struct icu4x_DateFormatter_create_y_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_y_mv1_result; 82 icu4x_DateFormatter_create_y_mv1_result icu4x_DateFormatter_create_y_mv1(const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 83 84 typedef struct icu4x_DateFormatter_create_y_with_provider_mv1_result {union {DateFormatter* ok; DateTimeFormatterLoadError err;}; bool is_ok;} icu4x_DateFormatter_create_y_with_provider_mv1_result; 85 icu4x_DateFormatter_create_y_with_provider_mv1_result icu4x_DateFormatter_create_y_with_provider_mv1(const DataProvider* provider, const Locale* locale, DateTimeLength_option length, DateTimeAlignment_option alignment, YearStyle_option year_style); 86 87 void icu4x_DateFormatter_format_iso_mv1(const DateFormatter* self, const IsoDate* date, DiplomatWrite* write); 88 89 typedef struct icu4x_DateFormatter_format_same_calendar_mv1_result {union { DateTimeMismatchedCalendarError err;}; bool is_ok;} icu4x_DateFormatter_format_same_calendar_mv1_result; 90 icu4x_DateFormatter_format_same_calendar_mv1_result icu4x_DateFormatter_format_same_calendar_mv1(const DateFormatter* self, const Date* date, DiplomatWrite* write); 91 92 void icu4x_DateFormatter_destroy_mv1(DateFormatter* self); 93 94 95 96 97 98 #endif // DateFormatter_H