From b2e714c21aa8c9fd9bbb080340cc84fa65b7e24d Mon Sep 17 00:00:00 2001 From: Travis Keep Date: Wed, 11 Jun 2014 19:45:30 +0000 Subject: [PATCH] ICU-10884 Applied review comments from Andy Heninger. X-SVN-Rev: 35862 --- icu4c/source/i18n/reldatefmt.cpp | 9 ++------- icu4c/source/i18n/unicode/reldatefmt.h | 11 ++++++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/icu4c/source/i18n/reldatefmt.cpp b/icu4c/source/i18n/reldatefmt.cpp index 61de3098edc..1ad63fe1116 100644 --- a/icu4c/source/i18n/reldatefmt.cpp +++ b/icu4c/source/i18n/reldatefmt.cpp @@ -32,11 +32,6 @@ #include "sharedpluralrules.h" #include "sharednumberformat.h" -#define RELDATE_STYLE_FULL 0 -#define RELDATE_STYLE_SHORT 1 -#define RELDATE_STYLE_NARROW 2 -#define RELDATE_STYLE_COUNT 3 - // Copied from uscript_props.cpp #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) @@ -78,11 +73,11 @@ public: virtual ~RelativeDateTimeCacheData(); // no numbers: e.g Next Tuesday; Yesterday; etc. - UnicodeString absoluteUnits[RELDATE_STYLE_COUNT][UDAT_ABSOLUTE_UNIT_COUNT][UDAT_DIRECTION_COUNT]; + UnicodeString absoluteUnits[UDAT_STYLE_COUNT][UDAT_ABSOLUTE_UNIT_COUNT][UDAT_DIRECTION_COUNT]; // has numbers: e.g Next Tuesday; Yesterday; etc. For second index, 0 // means past e.g 5 days ago; 1 means future e.g in 5 days. - QuantityFormatter relativeUnits[RELDATE_STYLE_COUNT][UDAT_RELATIVE_UNIT_COUNT][2]; + QuantityFormatter relativeUnits[UDAT_STYLE_COUNT][UDAT_RELATIVE_UNIT_COUNT][2]; void adoptCombinedDateAndTime(MessageFormat *mfToAdopt) { delete combinedDateAndTime; diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h index 1ca375ebefe..9ada8a02f4f 100644 --- a/icu4c/source/i18n/unicode/reldatefmt.h +++ b/icu4c/source/i18n/unicode/reldatefmt.h @@ -49,6 +49,12 @@ typedef enum UDateRelativeDateTimeFormatterStyle { * @draft ICU 54 */ UDAT_STYLE_NARROW, + + /** + * The number of styles. + * @draft ICU 54 + */ + UDAT_STYLE_COUNT, }; /** @@ -360,9 +366,8 @@ public: * contents after calling this constructor. Caller may pass NULL for * this argument if they want default number format behavior. * @param style the format style. The UDAT_RELATIVE bit field has no effect. - * @param capitalizationContext The capitalization context must start with - * U_DISPCTX_CAPITALIZATION_. Otherwise status is set to - * U_ILLEGAL_ARGUMENT_ERROR + * @param capitalizationContext A value from UDisplayContext that pertains to + * capitalization. * @status Any error is returned here. * @draft ICU 53 */ -- 2.40.0