00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef UDATEINTERVALFORMAT_H
00011 #define UDATEINTERVALFORMAT_H
00012
00013 #include "unicode/utypes.h"
00014
00015 #if !UCONFIG_NO_FORMATTING
00016
00017 #include "unicode/umisc.h"
00018 #include "unicode/localpointer.h"
00019 #include "unicode/uformattedvalue.h"
00020
00082 struct UDateIntervalFormat;
00083 typedef struct UDateIntervalFormat UDateIntervalFormat;
00085 #ifndef U_HIDE_DRAFT_API
00086 struct UFormattedDateInterval;
00091 typedef struct UFormattedDateInterval UFormattedDateInterval;
00092 #endif
00093
00118 U_STABLE UDateIntervalFormat* U_EXPORT2
00119 udtitvfmt_open(const char* locale,
00120 const UChar* skeleton,
00121 int32_t skeletonLength,
00122 const UChar* tzID,
00123 int32_t tzIDLength,
00124 UErrorCode* status);
00125
00132 U_STABLE void U_EXPORT2
00133 udtitvfmt_close(UDateIntervalFormat *formatter);
00134
00135
00136 #ifndef U_HIDE_DRAFT_API
00137
00146 U_CAPI UFormattedDateInterval* U_EXPORT2
00147 udtitvfmt_openResult(UErrorCode* ec);
00148
00171 U_CAPI const UFormattedValue* U_EXPORT2
00172 udtitvfmt_resultAsValue(const UFormattedDateInterval* uresult, UErrorCode* ec);
00173
00180 U_CAPI void U_EXPORT2
00181 udtitvfmt_closeResult(UFormattedDateInterval* uresult);
00182 #endif
00183
00184
00185 #if U_SHOW_CPLUSPLUS_API
00186
00187 U_NAMESPACE_BEGIN
00188
00198 U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateIntervalFormatPointer, UDateIntervalFormat, udtitvfmt_close);
00199
00200 #ifndef U_HIDE_DRAFT_API
00201
00210 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattedDateIntervalPointer, UFormattedDateInterval, udtitvfmt_closeResult);
00211 #endif
00212
00213 U_NAMESPACE_END
00214
00215 #endif
00216
00217
00247 U_STABLE int32_t U_EXPORT2
00248 udtitvfmt_format(const UDateIntervalFormat* formatter,
00249 UDate fromDate,
00250 UDate toDate,
00251 UChar* result,
00252 int32_t resultCapacity,
00253 UFieldPosition* position,
00254 UErrorCode* status);
00255
00256
00257 #ifndef U_HIDE_DRAFT_API
00258
00274 U_DRAFT void U_EXPORT2
00275 udtitvfmt_formatToResult(
00276 const UDateIntervalFormat* formatter,
00277 UFormattedDateInterval* result,
00278 UDate fromDate,
00279 UDate toDate,
00280 UErrorCode* status);
00281 #endif
00282
00283
00284 #endif
00285
00286 #endif