| 1 |
#ifndef ICU4XDate_H |
| 2 |
#define ICU4XDate_H |
| 3 |
#include <stdio.h> |
| 4 |
#include <stdint.h> |
| 5 |
#include <stddef.h> |
| 6 |
#include <stdbool.h> |
| 7 |
#include "diplomat_runtime.h" |
| 8 |
|
| 9 |
#ifdef __cplusplus |
| 10 |
namespace capi { |
| 11 |
#endif |
| 12 |
|
| 13 |
typedef struct ICU4XDate ICU4XDate; |
| 14 |
#ifdef __cplusplus |
| 15 |
} // namespace capi |
| 16 |
#endif |
| 17 |
#include "ICU4XCalendar.h" |
| 18 |
#include "diplomat_result_box_ICU4XDate_ICU4XError.h" |
| 19 |
#include "ICU4XIsoDate.h" |
| 20 |
#include "ICU4XIsoWeekday.h" |
| 21 |
#include "ICU4XWeekCalculator.h" |
| 22 |
#include "diplomat_result_ICU4XWeekOf_ICU4XError.h" |
| 23 |
#include "diplomat_result_void_ICU4XError.h" |
| 24 |
#ifdef __cplusplus |
| 25 |
namespace capi { |
| 26 |
extern "C" { |
| 27 |
#endif |
| 28 |
|
| 29 |
diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_iso_in_calendar(int32_t year, uint8_t month, uint8_t day, const ICU4XCalendar* calendar); |
| 30 |
|
| 31 |
diplomat_result_box_ICU4XDate_ICU4XError ICU4XDate_create_from_codes_in_calendar(const char* era_code_data, size_t era_code_len, int32_t year, const char* month_code_data, size_t month_code_len, uint8_t day, const ICU4XCalendar* calendar); |
| 32 |
|
| 33 |
ICU4XDate* ICU4XDate_to_calendar(const ICU4XDate* self, const ICU4XCalendar* calendar); |
| 34 |
|
| 35 |
ICU4XIsoDate* ICU4XDate_to_iso(const ICU4XDate* self); |
| 36 |
|
| 37 |
uint16_t ICU4XDate_day_of_year(const ICU4XDate* self); |
| 38 |
|
| 39 |
uint32_t ICU4XDate_day_of_month(const ICU4XDate* self); |
| 40 |
|
| 41 |
ICU4XIsoWeekday ICU4XDate_day_of_week(const ICU4XDate* self); |
| 42 |
|
| 43 |
uint32_t ICU4XDate_week_of_month(const ICU4XDate* self, ICU4XIsoWeekday first_weekday); |
| 44 |
|
| 45 |
diplomat_result_ICU4XWeekOf_ICU4XError ICU4XDate_week_of_year(const ICU4XDate* self, const ICU4XWeekCalculator* calculator); |
| 46 |
|
| 47 |
uint32_t ICU4XDate_ordinal_month(const ICU4XDate* self); |
| 48 |
|
| 49 |
diplomat_result_void_ICU4XError ICU4XDate_month_code(const ICU4XDate* self, DiplomatWriteable* write); |
| 50 |
|
| 51 |
int32_t ICU4XDate_year_in_era(const ICU4XDate* self); |
| 52 |
|
| 53 |
diplomat_result_void_ICU4XError ICU4XDate_era(const ICU4XDate* self, DiplomatWriteable* write); |
| 54 |
|
| 55 |
uint8_t ICU4XDate_months_in_year(const ICU4XDate* self); |
| 56 |
|
| 57 |
uint8_t ICU4XDate_days_in_month(const ICU4XDate* self); |
| 58 |
|
| 59 |
uint16_t ICU4XDate_days_in_year(const ICU4XDate* self); |
| 60 |
|
| 61 |
ICU4XCalendar* ICU4XDate_calendar(const ICU4XDate* self); |
| 62 |
void ICU4XDate_destroy(ICU4XDate* self); |
| 63 |
|
| 64 |
#ifdef __cplusplus |
| 65 |
} // extern "C" |
| 66 |
} // namespace capi |
| 67 |
#endif |
| 68 |
#endif |