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/.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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user