ICU-7988 add svn properties to text files as appropriate.
X-SVN-Rev: 28711
This commit is contained in:
parent
1c80d23e57
commit
33a8b6e5a7
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -223,7 +223,6 @@ icu4j/main/classes/core/.classpath -text
|
|||||||
icu4j/main/classes/core/.project -text
|
icu4j/main/classes/core/.project -text
|
||||||
icu4j/main/classes/core/.settings/org.eclipse.jdt.core.prefs -text
|
icu4j/main/classes/core/.settings/org.eclipse.jdt.core.prefs -text
|
||||||
icu4j/main/classes/core/manifest.stub -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/.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.core.prefs -text
|
||||||
icu4j/main/classes/currdata/.settings/org.eclipse.jdt.ui.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.core.prefs -text
|
||||||
icu4j/main/tests/collate/.settings/org.eclipse.jdt.ui.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/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/.classpath -text
|
||||||
icu4j/main/tests/core/.project -text
|
icu4j/main/tests/core/.project -text
|
||||||
icu4j/main/tests/core/.settings/org.eclipse.jdt.core.prefs -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/.project -text
|
||||||
icu4j/main/tests/framework/.settings/org.eclipse.jdt.core.prefs -text
|
icu4j/main/tests/framework/.settings/org.eclipse.jdt.core.prefs -text
|
||||||
icu4j/main/tests/framework/manifest.stub -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/.classpath -text
|
||||||
icu4j/main/tests/localespi/.project -text
|
icu4j/main/tests/localespi/.project -text
|
||||||
icu4j/main/tests/localespi/manifest.stub -text
|
icu4j/main/tests/localespi/manifest.stub -text
|
||||||
|
@ -1,94 +1,94 @@
|
|||||||
/*
|
/*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* Copyright (C) 2010, International Business Machines Corporation and *
|
* Copyright (C) 2010, International Business Machines Corporation and *
|
||||||
* others. All Rights Reserved. *
|
* others. All Rights Reserved. *
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
package com.ibm.icu.impl;
|
package com.ibm.icu.impl;
|
||||||
|
|
||||||
import com.ibm.icu.util.TimeZone;
|
import com.ibm.icu.util.TimeZone;
|
||||||
import com.ibm.icu.util.ULocale;
|
import com.ibm.icu.util.ULocale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author JCEmmons
|
* @author JCEmmons
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TimeZoneFormat {
|
public class TimeZoneFormat {
|
||||||
|
|
||||||
public ZoneStringFormat zsf;
|
public ZoneStringFormat zsf;
|
||||||
|
|
||||||
public static TimeZoneFormat createInstance ( ULocale loc ) {
|
public static TimeZoneFormat createInstance ( ULocale loc ) {
|
||||||
TimeZoneFormat tzf = new TimeZoneFormat();
|
TimeZoneFormat tzf = new TimeZoneFormat();
|
||||||
tzf.zsf = ZoneStringFormat.getInstance(loc);
|
tzf.zsf = ZoneStringFormat.getInstance(loc);
|
||||||
return tzf;
|
return tzf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String format ( TimeZone tz, long date, int style ) {
|
public String format ( TimeZone tz, long date, int style ) {
|
||||||
String result = null;
|
String result = null;
|
||||||
switch ( style ) {
|
switch ( style ) {
|
||||||
case TimeZone.SHORT :
|
case TimeZone.SHORT :
|
||||||
case TimeZone.SHORT_COMMONLY_USED :
|
case TimeZone.SHORT_COMMONLY_USED :
|
||||||
result = zsf.getSpecificShortString(tz, date, style == TimeZone.SHORT_COMMONLY_USED);
|
result = zsf.getSpecificShortString(tz, date, style == TimeZone.SHORT_COMMONLY_USED);
|
||||||
break;
|
break;
|
||||||
case TimeZone.LONG :
|
case TimeZone.LONG :
|
||||||
result = zsf.getSpecificLongString(tz, date);
|
result = zsf.getSpecificLongString(tz, date);
|
||||||
break;
|
break;
|
||||||
case TimeZone.SHORT_GENERIC :
|
case TimeZone.SHORT_GENERIC :
|
||||||
result = zsf.getGenericShortString(tz, date, true);
|
result = zsf.getGenericShortString(tz, date, true);
|
||||||
break;
|
break;
|
||||||
case TimeZone.LONG_GENERIC :
|
case TimeZone.LONG_GENERIC :
|
||||||
result = zsf.getGenericLongString(tz, date);
|
result = zsf.getGenericLongString(tz, date);
|
||||||
break;
|
break;
|
||||||
case TimeZone.SHORT_GMT :
|
case TimeZone.SHORT_GMT :
|
||||||
result = zsf.getShortGMTString(tz,date);
|
result = zsf.getShortGMTString(tz,date);
|
||||||
break;
|
break;
|
||||||
case TimeZone.LONG_GMT :
|
case TimeZone.LONG_GMT :
|
||||||
result = zsf.getLongGMTString(tz, date);
|
result = zsf.getLongGMTString(tz, date);
|
||||||
break;
|
break;
|
||||||
case TimeZone.GENERIC_LOCATION :
|
case TimeZone.GENERIC_LOCATION :
|
||||||
result = zsf.getGenericLocationString(tz, date);
|
result = zsf.getGenericLocationString(tz, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String format ( TimeZone tz, int style, boolean daylight ) {
|
public String format ( TimeZone tz, int style, boolean daylight ) {
|
||||||
return format (tz, System.currentTimeMillis(), style, daylight);
|
return format (tz, System.currentTimeMillis(), style, daylight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String format ( TimeZone tz, long date , int style , boolean daylight ) {
|
public String format ( TimeZone tz, long date , int style , boolean daylight ) {
|
||||||
String result = null;
|
String result = null;
|
||||||
switch ( style ) {
|
switch ( style ) {
|
||||||
case TimeZone.LONG :
|
case TimeZone.LONG :
|
||||||
if ( daylight ) {
|
if ( daylight ) {
|
||||||
result = zsf.getLongDaylight(tz.getID(), date);
|
result = zsf.getLongDaylight(tz.getID(), date);
|
||||||
} else {
|
} else {
|
||||||
result = zsf.getLongStandard(tz.getID(),date);
|
result = zsf.getLongStandard(tz.getID(),date);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TimeZone.SHORT :
|
case TimeZone.SHORT :
|
||||||
case TimeZone.SHORT_COMMONLY_USED :
|
case TimeZone.SHORT_COMMONLY_USED :
|
||||||
if ( daylight ) {
|
if ( daylight ) {
|
||||||
result = zsf.getShortDaylight(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED);
|
result = zsf.getShortDaylight(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED);
|
||||||
} else {
|
} else {
|
||||||
result = zsf.getShortStandard(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED);
|
result = zsf.getShortStandard(tz.getID(), date, style == TimeZone.SHORT_COMMONLY_USED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TimeZone.SHORT_GMT :
|
case TimeZone.SHORT_GMT :
|
||||||
result = zsf.getShortGMTString(tz, date, daylight);
|
result = zsf.getShortGMTString(tz, date, daylight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TimeZone.LONG_GMT:
|
case TimeZone.LONG_GMT:
|
||||||
result = zsf.getLongGMTString(tz, date, daylight);
|
result = zsf.getLongGMTString(tz, date, daylight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
result = format ( tz, date, style );
|
result = format ( tz, date, style );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user