Monday, March 31, 2014

DateTimeFormat is not showing the locales specific formatting.


I am using the DateTimeFormat and it's working fine for English, however, in Arabic it's showing the exact value as shown for the English locale!

Here's the code:

public static String getFormattedDate(String date) {
        final DateTimeFormat formatter = DateTimeFormat.getFormat("yyyy-MM-dd'T'HH:mm:ss");

        try {
            final Date parsedDate = formatter.parse(date);
            return DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_MEDIUM).format(parsedDate);
        } catch (IllegalArgumentException e) {
            return date;


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment