}
UnicodeString&
-TimeZone::getDisplayName(UBool daylight, EDisplayType style, UnicodeString& result) const
+TimeZone::getDisplayName(UBool inDaylight, EDisplayType style, UnicodeString& result) const
{
- return getDisplayName(daylight,style, Locale::getDefault(), result);
+ return getDisplayName(inDaylight,style, Locale::getDefault(), result);
}
//--------------------------------------
int32_t
}
//---------------------------------------
UnicodeString&
-TimeZone::getDisplayName(UBool daylight, EDisplayType style, const Locale& locale, UnicodeString& result) const
+TimeZone::getDisplayName(UBool inDaylight, EDisplayType style, const Locale& locale, UnicodeString& result) const
{
UErrorCode status = U_ZERO_ERROR;
UDate date = Calendar::getNow();
// Generic format many use Localized GMT as the final fallback.
// When Localized GMT format is used, the result might not be
// appropriate for the requested daylight value.
- if ((daylight && timeType == UTZFMT_TIME_TYPE_STANDARD) || (!daylight && timeType == UTZFMT_TIME_TYPE_DAYLIGHT)) {
- offset = daylight ? getRawOffset() + getDSTSavings() : getRawOffset();
+ if ((inDaylight && timeType == UTZFMT_TIME_TYPE_STANDARD) || (!inDaylight && timeType == UTZFMT_TIME_TYPE_DAYLIGHT)) {
+ offset = inDaylight ? getRawOffset() + getDSTSavings() : getRawOffset();
if (style == SHORT_GENERIC) {
tzfmt->formatOffsetShortLocalizedGMT(offset, result, status);
} else {
result.remove();
return result;
}
- offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
+ offset = inDaylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
switch (style) {
case LONG_GMT:
tzfmt->formatOffsetLocalizedGMT(offset, result, status);
UTimeZoneNameType nameType = UTZNM_UNKNOWN;
switch (style) {
case LONG:
- nameType = daylight ? UTZNM_LONG_DAYLIGHT : UTZNM_LONG_STANDARD;
+ nameType = inDaylight ? UTZNM_LONG_DAYLIGHT : UTZNM_LONG_STANDARD;
break;
case SHORT:
case SHORT_COMMONLY_USED:
- nameType = daylight ? UTZNM_SHORT_DAYLIGHT : UTZNM_SHORT_STANDARD;
+ nameType = inDaylight ? UTZNM_SHORT_DAYLIGHT : UTZNM_SHORT_STANDARD;
break;
default:
UPRV_UNREACHABLE;
if (result.isEmpty()) {
// Fallback to localized GMT
LocalPointer<TimeZoneFormat> tzfmt(TimeZoneFormat::createInstance(locale, status));
- offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
+ offset = inDaylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
if (style == LONG) {
tzfmt->formatOffsetLocalizedGMT(offset, result, status);
} else {
* If the display name is not available for the locale,
* then this method returns a string in the localized GMT offset format
* such as <code>GMT[+-]HH:mm</code>.
- * @param daylight if true, return the daylight savings name.
+ * @param inDaylight if true, return the daylight savings name.
* @param style
* @param result the human-readable name of this time zone in the default locale.
* @return A reference to 'result'.
* @stable ICU 2.0
*/
- UnicodeString& getDisplayName(UBool daylight, EDisplayType style, UnicodeString& result) const;
+ UnicodeString& getDisplayName(UBool inDaylight, EDisplayType style, UnicodeString& result) const;
/**
* Returns a name of this time zone suitable for presentation to the user
* If the display name is not available for the locale,
* then this method returns a string in the localized GMT offset format
* such as <code>GMT[+-]HH:mm</code>.
- * @param daylight if true, return the daylight savings name.
+ * @param inDaylight if true, return the daylight savings name.
* @param style
* @param locale the locale in which to supply the display name.
* @param result the human-readable name of this time zone in the given locale
* @return A refence to 'result'.
* @stable ICU 2.0
*/
- UnicodeString& getDisplayName(UBool daylight, EDisplayType style, const Locale& locale, UnicodeString& result) const;
+ UnicodeString& getDisplayName(UBool inDaylight, EDisplayType style, const Locale& locale, UnicodeString& result) const;
/**
* Queries if this time zone uses daylight savings time.