Example usage for com.google.gwt.i18n.shared TimeZone getShortName

List of usage examples for com.google.gwt.i18n.shared TimeZone getShortName

Introduction

In this page you can find the example usage for com.google.gwt.i18n.shared TimeZone getShortName.

Prototype

String getShortName(Date date);

Source Link

Document

Returns the short time zone name for a given date.

Usage

From source file:com.rnb.plategka.shared.DateTimeFormat.java

License:Apache License

/**
 * Formats Timezone field./*from  www  .j ava2 s.  c o  m*/
 * 
 * @param buf
 *            where formatted string will be appended to
 * @param count
 *            number of time pattern char repeats; this controls how a field
 *            should be formatted
 * @param date
 *            hold the date object to be formatted
 */
private void formatTimeZone(StringBuffer buf, int count, Date date, TimeZone timeZone) {
    if (count < 4) {
        buf.append(timeZone.getShortName(date));
    } else {
        buf.append(timeZone.getLongName(date));
    }
}

From source file:org.ssgwt.share.i18n.DateTimeFormat.java

License:Apache License

/**
 * Formats Timezone field./*from  w  ww  . java  2s . c om*/
 *
 * @param buf where formatted string will be appended to
 * @param count number of time pattern char repeats; this controls how a field
 *          should be formatted
 * @param date hold the date object to be formatted
 */
private void formatTimeZone(StringBuffer buf, int count, SSDate date, TimeZone timeZone) {
    if (count < 4) {
        buf.append(timeZone.getShortName(date));
    } else {
        buf.append(timeZone.getLongName(date));
    }
}