]> granicus.if.org Git - icu/commitdiff
ICU-10884 Applied review comments from Andy Heninger.
authorTravis Keep <keep94@gmail.com>
Wed, 11 Jun 2014 19:45:30 +0000 (19:45 +0000)
committerTravis Keep <keep94@gmail.com>
Wed, 11 Jun 2014 19:45:30 +0000 (19:45 +0000)
X-SVN-Rev: 35862

icu4c/source/i18n/reldatefmt.cpp
icu4c/source/i18n/unicode/reldatefmt.h

index 61de3098edc6962cdf22760d4d1ad0c315addb96..1ad63fe1116a4aadd49ad237eaf320fb9e99500e 100644 (file)
 #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;
index 1ca375ebefe543e7abceb1d8db29f270ed5960b4..9ada8a02f4fc29d306904c08b229936837034ef2 100644 (file)
@@ -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
      */