]> granicus.if.org Git - icu/commitdiff
ICU-20142 Document the skeleton for MessageFormat number arguments (#121)
authorMihai Nita <nmihai_2000@yahoo.com>
Fri, 21 Sep 2018 01:11:01 +0000 (18:11 -0700)
committerShane Carr <shane@unicode.org>
Thu, 27 Sep 2018 21:27:41 +0000 (14:27 -0700)
icu4c/source/i18n/unicode/msgfmt.h
icu4j/main/classes/core/src/com/ibm/icu/text/MessageFormat.java

index baf55e48f39285b8fc6d3fa14809ff2aa570df55..074d93354000ef28d1e69ba5cb928cf770b9618d 100644 (file)
@@ -124,7 +124,7 @@ class NumberFormat;
  * argNumber = '0' | ('1'..'9' ('0'..'9')*)
  *
  * argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duration"
- * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText
+ * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText | "::" argSkeletonText
  * </pre>
  *
  * <ul>
@@ -166,7 +166,7 @@ class NumberFormat;
  *       <td colspan=2><i>(none)</i>
  *       <td><code>null</code>
  *    <tr>
- *       <td rowspan=5><code>number</code>
+ *       <td rowspan=6><code>number</code>
  *       <td><i>(none)</i>
  *       <td><code>NumberFormat.createInstance(getLocale(), status)</code>
  *    <tr>
@@ -182,6 +182,9 @@ class NumberFormat;
  *       <td><i>argStyleText</i>
  *       <td><code>new DecimalFormat(argStyleText, new DecimalFormatSymbols(getLocale(), status), status)</code>
  *    <tr>
+ *       <td><i>argSkeletonText</i>
+ *       <td><code>NumberFormatter::forSkeleton(argSkeletonText, status).locale(getLocale()).toFormat(status)</code>
+ *    <tr>
  *       <td rowspan=6><code>date</code>
  *       <td><i>(none)</i>
  *       <td><code>DateFormat.createDateInstance(kDefault, getLocale(), status)</code>
index ceaf2dfa689e208870e6c1c98b9f7643c7c9317c..4da8defe53f89fa14e64ffed695fe885d46ee7e1 100644 (file)
@@ -123,7 +123,7 @@ import com.ibm.icu.util.ULocale.Category;
  * argNumber = '0' | ('1'..'9' ('0'..'9')*)
  *
  * argType = "number" | "date" | "time" | "spellout" | "ordinal" | "duration"
- * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText
+ * argStyle = "short" | "medium" | "long" | "full" | "integer" | "currency" | "percent" | argStyleText | "::" argSkeletonText
  * </pre></blockquote>
  *
  * <ul>
@@ -164,7 +164,7 @@ import com.ibm.icu.util.ULocale.Category;
  *       <td colspan=2><i>(none)</i>
  *       <td><code>null</code>
  *    <tr>
- *       <td rowspan=5><code>number</code>
+ *       <td rowspan=6><code>number</code>
  *       <td><i>(none)</i>
  *       <td><code>NumberFormat.getInstance(getLocale())</code>
  *    <tr>
@@ -180,6 +180,9 @@ import com.ibm.icu.util.ULocale.Category;
  *       <td><i>argStyleText</i>
  *       <td><code>new DecimalFormat(argStyleText, new DecimalFormatSymbols(getLocale()))</code>
  *    <tr>
+ *       <td><i>argSkeletonText</i>
+ *       <td><code>NumberFormatter.forSkeleton(argSkeletonText).locale(getLocale()).toFormat()</code>
+ *    <tr>
  *       <td rowspan=6><code>date</code>
  *       <td><i>(none)</i>
  *       <td><code>DateFormat.getDateInstance(DateFormat.DEFAULT, getLocale())</code>