IsoDate.h (1753B)
1 #ifndef IsoDate_H 2 #define IsoDate_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 "Calendar.d.h" 11 #include "CalendarError.d.h" 12 #include "Date.d.h" 13 #include "IsoWeekOfYear.d.h" 14 #include "Rfc9557ParseError.d.h" 15 #include "Weekday.d.h" 16 17 #include "IsoDate.d.h" 18 19 20 21 22 23 24 typedef struct icu4x_IsoDate_create_mv1_result {union {IsoDate* ok; CalendarError err;}; bool is_ok;} icu4x_IsoDate_create_mv1_result; 25 icu4x_IsoDate_create_mv1_result icu4x_IsoDate_create_mv1(int32_t year, uint8_t month, uint8_t day); 26 27 IsoDate* icu4x_IsoDate_from_rata_die_mv1(int64_t rd); 28 29 typedef struct icu4x_IsoDate_from_string_mv1_result {union {IsoDate* ok; Rfc9557ParseError err;}; bool is_ok;} icu4x_IsoDate_from_string_mv1_result; 30 icu4x_IsoDate_from_string_mv1_result icu4x_IsoDate_from_string_mv1(DiplomatStringView v); 31 32 Date* icu4x_IsoDate_to_calendar_mv1(const IsoDate* self, const Calendar* calendar); 33 34 Date* icu4x_IsoDate_to_any_mv1(const IsoDate* self); 35 36 int64_t icu4x_IsoDate_to_rata_die_mv1(const IsoDate* self); 37 38 uint16_t icu4x_IsoDate_day_of_year_mv1(const IsoDate* self); 39 40 uint8_t icu4x_IsoDate_day_of_month_mv1(const IsoDate* self); 41 42 Weekday icu4x_IsoDate_day_of_week_mv1(const IsoDate* self); 43 44 IsoWeekOfYear icu4x_IsoDate_week_of_year_mv1(const IsoDate* self); 45 46 uint8_t icu4x_IsoDate_month_mv1(const IsoDate* self); 47 48 int32_t icu4x_IsoDate_year_mv1(const IsoDate* self); 49 50 bool icu4x_IsoDate_is_in_leap_year_mv1(const IsoDate* self); 51 52 uint8_t icu4x_IsoDate_months_in_year_mv1(const IsoDate* self); 53 54 uint8_t icu4x_IsoDate_days_in_month_mv1(const IsoDate* self); 55 56 uint16_t icu4x_IsoDate_days_in_year_mv1(const IsoDate* self); 57 58 void icu4x_IsoDate_destroy_mv1(IsoDate* self); 59 60 61 62 63 64 #endif // IsoDate_H