congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TimeZoneNames.getDisplayName
Code IndexAdd Tabnine to your IDE (free)

How to use
getDisplayName
method
in
libcore.icu.TimeZoneNames

Best Java code snippets using libcore.icu.TimeZoneNames.getDisplayName (Showing top 14 results out of 315)

origin: robovm/robovm

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: robovm/robovm

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: ibinti/bugvm

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: MobiVM/robovm

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: com.gluonhq/robovm-rt

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: com.bugvm/bugvm-rt

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: FlexoVM/flexovm

/**
 * Append a representation of the time zone of 'calendar' to 'buffer'.
 *
 * @param count the number of z or Z characters in the format string; "zzz" would be 3,
 * for example.
 * @param generalTimeZone true if we should use a display name ("PDT") if available;
 * false implies that we should use RFC 822 format ("-0800") instead. This corresponds to 'z'
 * versus 'Z' in the format string.
 */
private void appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) {
  if (generalTimeZone) {
    TimeZone tz = calendar.getTimeZone();
    boolean daylight = (calendar.get(Calendar.DST_OFFSET) != 0);
    int style = count < 4 ? TimeZone.SHORT : TimeZone.LONG;
    if (!formatData.customZoneStrings) {
      buffer.append(tz.getDisplayName(daylight, style, formatData.locale));
      return;
    }
    // We can't call TimeZone.getDisplayName() because it would not use
    // the custom DateFormatSymbols of this SimpleDateFormat.
    String custom = TimeZoneNames.getDisplayName(formatData.zoneStrings, tz.getID(), daylight, style);
    if (custom != null) {
      buffer.append(custom);
      return;
    }
  }
  // We didn't find what we were looking for, so default to a numeric time zone.
  appendNumericTimeZone(buffer, count, generalTimeZone);
}
origin: com.bugvm/bugvm-rt

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: MobiVM/robovm

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: com.mobidevelop.robovm/robovm-rt

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: ibinti/bugvm

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: com.gluonhq/robovm-rt

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
origin: FlexoVM/flexovm

String result = TimeZoneNames.getDisplayName(zoneStrings, getID(), daylightTime, style);
if (result != null) {
  return result;
libcore.icuTimeZoneNamesgetDisplayName

Javadoc

Returns the appropriate string from 'zoneStrings'. Used with getZoneStrings.

Popular methods of TimeZoneNames

  • getZoneStrings
    Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings.

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now