commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date
Date Sun, 05 Nov 2006 03:56:17 GMT
    [ http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12447220 ] 
            
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.

    http://svn.apache.org/viewvc?view=rev&revision=471352

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: http://issues.apache.org/jira/browse/BEANUTILS-255
>             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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message