[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: AbstractKernelTest and date handling
alesj
do-not-reply at jboss.com
Thu Mar 27 09:20:35 EDT 2008
"adrian at jboss.org" wrote : The alternative would be to fix the Date property editor such that you can
| specify the locale in the string, e.g. as a prefix
That's what I also already did. ;-)
| - String defaultFormat = System.getProperty("org.jboss.util.propertyeditor.DateEditor.format",
| - "MMM d, yyyy");
| + String defaultFormat = System.getProperty("org.jboss.util.propertyeditor.DateEditor.format", "MMM d, yyyy");
| + String defaultLocale = System.getProperty("org.jboss.util.propertyeditor.DateEditor.locale");
| + DateFormat defaultDateFormat;
| + if (defaultLocale == null)
| + {
| + defaultDateFormat = new SimpleDateFormat(defaultFormat);
| + }
| + else
| + {
| + defaultDateFormat = new SimpleDateFormat(defaultFormat, Strings.parseLocaleString(defaultLocale));
| + }
| +
| formats = new DateFormat[]
| {
| - new SimpleDateFormat(defaultFormat),
| + defaultDateFormat,
|
Just don't feel like waiting for the new commons release. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139271#4139271
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139271
More information about the jboss-dev-forums
mailing list