Examples of formatOffsetLocalizedGMT()


Examples of com.ibm.icu.text.TimeZoneFormat.formatOffsetLocalizedGMT()

      // 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.value == TimeType.STANDARD || !daylight && timeType.value == TimeType.DAYLIGHT) {
        int offset = daylight ? getRawOffset() + getDSTSavings() : getRawOffset();
        result = (style == SHORT_GENERIC) ? tzfmt.formatOffsetShortLocalizedGMT(offset) : tzfmt.formatOffsetLocalizedGMT(offset);
      }

    } else if (style == LONG_GMT || style == SHORT_GMT) {
      // Offset format
      TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
View Full Code Here

Examples of com.ibm.icu.text.TimeZoneFormat.formatOffsetLocalizedGMT()

      // Offset format
      TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
      int offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
      switch (style) {
      case LONG_GMT:
        result = tzfmt.formatOffsetLocalizedGMT(offset);
        break;
      case SHORT_GMT:
        result = tzfmt.formatOffsetISO8601Basic(offset, false, false, false);
        break;
      }
View Full Code Here

Examples of com.ibm.icu.text.TimeZoneFormat.formatOffsetLocalizedGMT()

      result = tznames.getDisplayName(ZoneMeta.getCanonicalCLDRID(this), nameType, date);
      if (result == null) {
        // Fallback to localized GMT
        TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
        int offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
        result = (style == LONG) ? tzfmt.formatOffsetLocalizedGMT(offset) : tzfmt.formatOffsetShortLocalizedGMT(offset);
      }
    }
    assert (result != null);

    return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.