format() of Date doesn't respect user locale
Bug #519710 reported by
j_soderstrom
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
play framework | Status tracked in 1.0 | |||||
1.0 |
Fix Released
|
Undecided
|
Erwan Loisant | |||
1.1 |
Fix Committed
|
Undecided
|
Erwan Loisant |
Bug Description
When using the format(Date date) method from JavaExtensions the users Locale is not used. Because of this names of months and weekdays will appear in the wrong language.
Proposed fix:
public static String format(Date date, String pattern) {
return new SimpleDateForma
}
public static String format(Date date) {
return new SimpleDateForma
}
To post a comment you must log in.
I had the same problem when I was doing the tutorial and I fixed the format method( JavaExtensions. java) like this,
public static String format(Date date, String pattern) { t(pattern, new Locale( Lang.get( ))).format( date);
return new SimpleDateForma
}