diff options
author | Elliott Hughes <enh@google.com> | 2010-01-04 14:06:25 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-01-04 14:06:25 -0800 |
commit | 6ca85c49efc0f02d69933f60b207b964a999061f (patch) | |
tree | e482011e0fc4534be096caf2527aa9c7e1e9db17 /icu/src/main/java | |
parent | 0b099e734632fb6de904194b43557d48a47f89f2 (diff) | |
download | libcore-6ca85c49efc0f02d69933f60b207b964a999061f.zip libcore-6ca85c49efc0f02d69933f60b207b964a999061f.tar.gz libcore-6ca85c49efc0f02d69933f60b207b964a999061f.tar.bz2 |
Fix build (accidental API leak).
Move a couple of methods into LocaleData -- where they should have been from
the beginning -- so they're automatically hidden from our users.
Diffstat (limited to 'icu/src/main/java')
-rw-r--r-- | icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java b/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java index 1e91574..24d3323 100644 --- a/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java +++ b/icu/src/main/java/com/ibm/icu4jni/util/LocaleData.java @@ -16,6 +16,8 @@ package com.ibm.icu4jni.util; +import java.text.DateFormat; + /** * Passes locale-specific from ICU native code to Java. * <p> @@ -166,4 +168,32 @@ public class LocaleData { percentPattern = overrides.percentPattern; } } + + public String getDateFormat(int style) { + switch (style) { + case DateFormat.SHORT: + return shortDateFormat; + case DateFormat.MEDIUM: + return mediumDateFormat; + case DateFormat.LONG: + return longDateFormat; + case DateFormat.FULL: + return fullDateFormat; + } + throw new AssertionError(); + } + + public String getTimeFormat(int style) { + switch (style) { + case DateFormat.SHORT: + return shortTimeFormat; + case DateFormat.MEDIUM: + return mediumTimeFormat; + case DateFormat.LONG: + return longTimeFormat; + case DateFormat.FULL: + return fullTimeFormat; + } + throw new AssertionError(); + } } |