tzParam = ", com.google.gwt.i18n.client.TimeZone.createTimeZone(" + tzArg + ")";
}
}
if (subformat.startsWith(PREDEF)) {
// TODO(jat): error checking/logging
PredefinedFormat predef;
try {
predef = PredefinedFormat.valueOf(subformat.substring(PREDEF.length()));
} catch (IllegalArgumentException e) {
logger.log(TreeLogger.ERROR, "Unrecognized predefined format '" + subformat + "'");
return true;
}
out.appendStringValuedExpression(
dtFormatClassName + ".getFormat("
+ PredefinedFormat.class.getCanonicalName() + "."
+ predef.toString() + ").format(" + argName + tzParam + ")");
return false;
}
DateTimePatternGenerator dtpg = new DateTimePatternGenerator(locale);
try {
String pattern = dtpg.getBestPattern(subformat);