On Sun, 28 Sep 2003, Joe Germuska wrote:

> At 22:39 -0400 9/27/03, Henri Yandell wrote:
> >I'm interested in the convert stuff. Especially the Object->String stuff.
> >
> >First a question on Dates. Why not support for java.util.Date? It seems
> >that there's not much point having SqlDateConverter, it should just be
> >DateConverter based on util.Date.
>
> The trick is that there's no universal conventions for formatting
> regular dates as strings, while java.sql.Date has a "valueOf(String)"
> method which adheres to a well-defined format standard.
>
> It's easy enough to write a Converter implementation that is seeded
> with a SimpleDateFormat  pattern-string, but it's also possible that
> you'd need to deal with dates in more than one format, especially if
> you are dealing with times as distinct from dates.
>
> I've worked around with a custom converter as described above, but
> I've never come up with a good solution for a general framework for
> it.

Not convinced by this argument.

1) Dates are just an example here. An especially gruesome example, so
specific issues don't bother me too much.

2) Date.valueOf is as good as DateFormat.format. Both of them make massive
assumptions about the format desired. This just means that people need to
be able to set their own option [and that BeanUtils needs to supply more
than just the default options].

Hen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to