ICU 63.1 63.1

udateintervalformat.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *****************************************************************************************
5 * Copyright (C) 2010-2012,2015 International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *****************************************************************************************
8 */
9
10 #ifndef UDATEINTERVALFORMAT_H
11 #define UDATEINTERVALFORMAT_H
12
13 #include "unicode/utypes.h"
14
15 #if !UCONFIG_NO_FORMATTING
16
17 #include "unicode/umisc.h"
18 #include "unicode/localpointer.h"
19
81 struct UDateIntervalFormat;
82 typedef struct UDateIntervalFormat UDateIntervalFormat;
108 U_STABLE UDateIntervalFormat* U_EXPORT2
109 udtitvfmt_open(const char* locale,
110 const UChar* skeleton,
111 int32_t skeletonLength,
112 const UChar* tzID,
113 int32_t tzIDLength,
114 UErrorCode* status);
115
122 U_STABLE void U_EXPORT2
123 udtitvfmt_close(UDateIntervalFormat *formatter);
124
125
126 #if U_SHOW_CPLUSPLUS_API
127
128 U_NAMESPACE_BEGIN
129
139 U_DEFINE_LOCAL_OPEN_POINTER(LocalUDateIntervalFormatPointer, UDateIntervalFormat, udtitvfmt_close);
140
141 U_NAMESPACE_END
142
143 #endif
144
145
175 U_STABLE int32_t U_EXPORT2
176 udtitvfmt_format(const UDateIntervalFormat* formatter,
177 UDate fromDate,
178 UDate toDate,
179 UChar* result,
180 int32_t resultCapacity,
181 UFieldPosition* position,
182 UErrorCode* status);
183
184 #endif /* #if !UCONFIG_NO_FORMATTING */
185
186 #endif
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
umisc.h
C API:misc definitions.
udtitvfmt_format
int32_t udtitvfmt_format(const UDateIntervalFormat *formatter, UDate fromDate, UDate toDate, UChar *result, int32_t resultCapacity, UFieldPosition *position, UErrorCode *status)
Formats a date/time range using the conventions established for the UDateIntervalFormat object...
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
LocalUDateIntervalFormatPointer
"Smart pointer" class, closes a UDateIntervalFormat via udtitvfmt_close().
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:487
UDateIntervalFormat
struct UDateIntervalFormat UDateIntervalFormat
C typedef for struct UDateIntervalFormat.
Definition: udateintervalformat.h:82
UFieldPosition
A struct representing a range of text containing a specific field.
Definition: umisc.h:34
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UChar
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
udtitvfmt_close
void udtitvfmt_close(UDateIntervalFormat *formatter)
Close a UDateIntervalFormat object.
udtitvfmt_open
UDateIntervalFormat * udtitvfmt_open(const char *locale, const UChar *skeleton, int32_t skeletonLength, const UChar *tzID, int32_t tzIDLength, UErrorCode *status)
Open a new UDateIntervalFormat object using the predefined rules for a given locale plus a specified ...
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111