From 6ca85c49efc0f02d69933f60b207b964a999061f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 4 Jan 2010 14:06:25 -0800 Subject: 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. --- .../main/java/com/ibm/icu4jni/util/LocaleData.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'icu/src') 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. *

@@ -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(); + } } -- cgit v1.1