ICU 57.1
57.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
i18n
unicode
ureldatefmt.h
Go to the documentation of this file.
1
/*
2
*****************************************************************************************
3
* Copyright (C) 2016, International Business Machines
4
* Corporation and others. All Rights Reserved.
5
*****************************************************************************************
6
*/
7
8
#ifndef URELDATEFMT_H
9
#define URELDATEFMT_H
10
11
#include "
unicode/utypes.h
"
12
13
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
14
15
#include "
unicode/unum.h
"
16
#include "
unicode/udisplaycontext.h
"
17
#include "
unicode/localpointer.h
"
18
42
typedef
enum
UDateRelativeDateTimeFormatterStyle
{
47
UDAT_STYLE_LONG
,
48
53
UDAT_STYLE_SHORT
,
54
59
UDAT_STYLE_NARROW
,
60
65
UDAT_STYLE_COUNT
66
}
UDateRelativeDateTimeFormatterStyle
;
67
68
#ifndef U_HIDE_DRAFT_API
69
74
typedef
enum
URelativeDateTimeUnit
{
80
UDAT_REL_UNIT_YEAR
,
86
UDAT_REL_UNIT_QUARTER
,
92
UDAT_REL_UNIT_MONTH
,
98
UDAT_REL_UNIT_WEEK
,
104
UDAT_REL_UNIT_DAY
,
110
UDAT_REL_UNIT_HOUR
,
116
UDAT_REL_UNIT_MINUTE
,
122
UDAT_REL_UNIT_SECOND
,
128
UDAT_REL_UNIT_SUNDAY
,
134
UDAT_REL_UNIT_MONDAY
,
140
UDAT_REL_UNIT_TUESDAY
,
146
UDAT_REL_UNIT_WEDNESDAY
,
152
UDAT_REL_UNIT_THURSDAY
,
158
UDAT_REL_UNIT_FRIDAY
,
164
UDAT_REL_UNIT_SATURDAY
,
169
UDAT_REL_UNIT_COUNT
170
}
URelativeDateTimeUnit
;
171
#endif
/* U_HIDE_DRAFT_API */
172
173
#ifndef U_HIDE_DRAFT_API
174
179
struct
URelativeDateTimeFormatter
;
180
typedef
struct
URelativeDateTimeFormatter
URelativeDateTimeFormatter
;
215
U_DRAFT
URelativeDateTimeFormatter
* U_EXPORT2
216
ureldatefmt_open
(
const
char
* locale,
217
UNumberFormat
* nfToAdopt,
218
UDateRelativeDateTimeFormatterStyle
width,
219
UDisplayContext
capitalizationContext,
220
UErrorCode
* status );
221
228
U_DRAFT
void
U_EXPORT2
229
ureldatefmt_close
(
URelativeDateTimeFormatter
*reldatefmt);
230
231
#if U_SHOW_CPLUSPLUS_API
232
233
U_NAMESPACE_BEGIN
234
244
U_DEFINE_LOCAL_OPEN_POINTER
(
LocalURelativeDateTimeFormatterPointer
,
URelativeDateTimeFormatter
,
ureldatefmt_close
);
245
246
U_NAMESPACE_END
247
248
#endif
249
278
U_DRAFT
int32_t U_EXPORT2
279
ureldatefmt_formatNumeric
(
const
URelativeDateTimeFormatter
* reldatefmt,
280
double
offset,
281
URelativeDateTimeUnit
unit,
282
UChar
* result,
283
int32_t resultCapacity,
284
UErrorCode
* status);
285
314
U_DRAFT
int32_t U_EXPORT2
315
ureldatefmt_format
(
const
URelativeDateTimeFormatter
* reldatefmt,
316
double
offset,
317
URelativeDateTimeUnit
unit,
318
UChar
* result,
319
int32_t resultCapacity,
320
UErrorCode
* status);
321
351
U_DRAFT
int32_t U_EXPORT2
352
ureldatefmt_combineDateAndTime
(
const
URelativeDateTimeFormatter
* reldatefmt,
353
const
UChar
* relativeDateString,
354
int32_t relativeDateStringLen,
355
const
UChar
* timeString,
356
int32_t timeStringLen,
357
UChar
* result,
358
int32_t resultCapacity,
359
UErrorCode
* status );
360
361
#endif
/* U_HIDE_DRAFT_API */
362
363
#endif
/* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION */
364
365
#endif
Generated on Wed Mar 16 2016 23:45:45 for ICU 57.1 by
1.8.1.2