commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date
Date Sun, 05 Nov 2006 03:56:17 GMT
    [ ] 
Niall Pemberton commented on BEANUTILS-255:

I've added/updated support for java.util.Date and java.util.Calendar - 99% of the work is
in the new DateTimeConverter implementation. I thought I do commit then review, rather than
other way round - since its easily reverted in SVN if there are still objections.

For java.util.Date and java.util.Calendar it can be configured to parse/format dates in one
of two ways:

1) Use the default SHORT date format, either for the default Locale or a specified Locale
2) Use a set of Date "patterns" with which to try and parse the date

As Simon pointed out, this isn't going to work for an application that has to deal with multiple
Locales - but thats true for all of the "converters" package - and the intention was for peole
to use the "locale.converters" package for that scenario. I think providing functionality
for "single Locale" scenarios is worth while though.

Also, its not just about conversion to and from Strings - these also provide conversion between
the different date types - which if BeanUtils is copying properties and, for example, the
source is a java.util.Calendar and target is java.util.Date - then going via a String, which
is what it would do currently is really bad.

Finally, as I said before people can easily register/de-register converters - so if they don't
want the functionality, they don't have to have it.

> ConvertUtilsBean does not support converts to a java.util.Date
> --------------------------------------------------------------
>                 Key: BEANUTILS-255
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Henri Yandell
>             Fix For: 1.8.0
> It's impossible to convert a String to a java.util.Date (see commons-user mail thread
'Digester and using of java.util.Date').

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message