From 33a8b6e5a703acd4fb3fd282112cbf2020896b2a Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Mon, 27 Sep 2010 22:31:10 +0000 Subject: [PATCH] ICU-7988 add svn properties to text files as appropriate. X-SVN-Rev: 28711 --- .gitattributes | 3 - .../src/com/ibm/icu/impl/TimeZoneFormat.java | 188 +++++++++--------- 2 files changed, 94 insertions(+), 97 deletions(-) diff --git a/.gitattributes b/.gitattributes index b41b80edde..12d4026558 100644 --- a/.gitattributes +++ b/.gitattributes @@ -223,7 +223,6 @@ icu4j/main/classes/core/.classpath -text icu4j/main/classes/core/.project -text icu4j/main/classes/core/.settings/org.eclipse.jdt.core.prefs -text icu4j/main/classes/core/manifest.stub -text -icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneFormat.java -text icu4j/main/classes/currdata/.externalToolBuilders/copy-data-currdata.launch -text icu4j/main/classes/currdata/.settings/org.eclipse.jdt.core.prefs -text icu4j/main/classes/currdata/.settings/org.eclipse.jdt.ui.prefs -text @@ -266,7 +265,6 @@ icu4j/main/tests/collate/.project -text icu4j/main/tests/collate/.settings/org.eclipse.jdt.core.prefs -text icu4j/main/tests/collate/.settings/org.eclipse.jdt.ui.prefs -text icu4j/main/tests/collate/collate-tests-build.launch -text -icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/Counter.java -text icu4j/main/tests/core/.classpath -text icu4j/main/tests/core/.project -text icu4j/main/tests/core/.settings/org.eclipse.jdt.core.prefs -text @@ -537,7 +535,6 @@ icu4j/main/tests/framework/.classpath -text icu4j/main/tests/framework/.project -text icu4j/main/tests/framework/.settings/org.eclipse.jdt.core.prefs -text icu4j/main/tests/framework/manifest.stub -text -icu4j/main/tests/framework/src/com/ibm/icu/dev/test/util/CollectionUtilities.java -text icu4j/main/tests/localespi/.classpath -text icu4j/main/tests/localespi/.project -text icu4j/main/tests/localespi/manifest.stub -text diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneFormat.java index 009bc090e7..45dde91d42 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/TimeZoneFormat.java @@ -1,94 +1,94 @@ -/* - ******************************************************************************* - * Copyright (C) 2010, International Business Machines Corporation and * - * others. All Rights Reserved. * - ******************************************************************************* - */ -package com.ibm.icu.impl; - -import com.ibm.icu.util.TimeZone; -import com.ibm.icu.util.ULocale; - -/** - * @author JCEmmons - * - */ -public class TimeZoneFormat { - - public ZoneStringFormat zsf; - - public static TimeZoneFormat createInstance ( ULocale loc ) { - TimeZoneFormat tzf = new TimeZoneFormat(); - tzf.zsf = ZoneStringFormat.getInstance(loc); - return tzf; - } - - public String format ( TimeZone tz, long date, int style ) { - String result = null; - switch ( style ) { - case TimeZone.SHORT : - case TimeZone.SHORT_COMMONLY_USED : - result = zsf.getSpecificShortString(tz, date, style == TimeZone.SHORT_COMMONLY_USED); - break; - case TimeZone.LONG : - result = zsf.getSpecificLongString(tz, date); - break; - case TimeZone.SHORT_GENERIC : - result = zsf.getGenericShortString(tz, date, true); - break; - case TimeZone.LONG_GENERIC : - result = zsf.getGenericLongString(tz, date); - break; - case TimeZone.SHORT_GMT : - result = zsf.getShortGMTString(tz,date); - break; - case TimeZone.LONG_GMT : - result = zsf.getLongGMTString(tz, date); - break; - case TimeZone.GENERIC_LOCATION : - result = zsf.getGenericLocationString(tz, date); - } - - return result; - } - - public String format ( TimeZone tz, int style, boolean daylight ) { - return format (tz, System.currentTimeMillis(), style, daylight); - } - - public String format ( TimeZone tz, long date , int style , boolean daylight ) { - String result = null; - switch ( style ) { - case TimeZone.LONG : - if ( daylight ) { - result = zsf.getLongDaylight(tz.getID(), date); - } else { - result = zsf.getLongStandard(tz.getID(),date); - } - break; - - case TimeZone.SHORT : - case TimeZone.SHORT_COMMONLY_USED : - if ( daylight ) { - result = zsf.getShortDaylight(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED); - } else { - result = zsf.getShortStandard(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED); - } - break; - - case TimeZone.SHORT_GMT : - result = zsf.getShortGMTString(tz, date, daylight); - break; - - case TimeZone.LONG_GMT: - result = zsf.getLongGMTString(tz, date, daylight); - break; - - default : - result = format ( tz, date, style ); - break; - } - return result; - } - -} +/* + ******************************************************************************* + * Copyright (C) 2010, International Business Machines Corporation and * + * others. All Rights Reserved. * + ******************************************************************************* + */ +package com.ibm.icu.impl; + +import com.ibm.icu.util.TimeZone; +import com.ibm.icu.util.ULocale; + +/** + * @author JCEmmons + * + */ +public class TimeZoneFormat { + + public ZoneStringFormat zsf; + + public static TimeZoneFormat createInstance ( ULocale loc ) { + TimeZoneFormat tzf = new TimeZoneFormat(); + tzf.zsf = ZoneStringFormat.getInstance(loc); + return tzf; + } + + public String format ( TimeZone tz, long date, int style ) { + String result = null; + switch ( style ) { + case TimeZone.SHORT : + case TimeZone.SHORT_COMMONLY_USED : + result = zsf.getSpecificShortString(tz, date, style == TimeZone.SHORT_COMMONLY_USED); + break; + case TimeZone.LONG : + result = zsf.getSpecificLongString(tz, date); + break; + case TimeZone.SHORT_GENERIC : + result = zsf.getGenericShortString(tz, date, true); + break; + case TimeZone.LONG_GENERIC : + result = zsf.getGenericLongString(tz, date); + break; + case TimeZone.SHORT_GMT : + result = zsf.getShortGMTString(tz,date); + break; + case TimeZone.LONG_GMT : + result = zsf.getLongGMTString(tz, date); + break; + case TimeZone.GENERIC_LOCATION : + result = zsf.getGenericLocationString(tz, date); + } + + return result; + } + + public String format ( TimeZone tz, int style, boolean daylight ) { + return format (tz, System.currentTimeMillis(), style, daylight); + } + + public String format ( TimeZone tz, long date , int style , boolean daylight ) { + String result = null; + switch ( style ) { + case TimeZone.LONG : + if ( daylight ) { + result = zsf.getLongDaylight(tz.getID(), date); + } else { + result = zsf.getLongStandard(tz.getID(),date); + } + break; + + case TimeZone.SHORT : + case TimeZone.SHORT_COMMONLY_USED : + if ( daylight ) { + result = zsf.getShortDaylight(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED); + } else { + result = zsf.getShortStandard(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED); + } + break; + + case TimeZone.SHORT_GMT : + result = zsf.getShortGMTString(tz, date, daylight); + break; + + case TimeZone.LONG_GMT: + result = zsf.getLongGMTString(tz, date, daylight); + break; + + default : + result = format ( tz, date, style ); + break; + } + return result; + } + +}