commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [beanutils] default converters for File and URL?
Date Fri, 04 Apr 2003 19:04:06 GMT


On Fri, 4 Apr 2003, Craig R. McClanahan wrote:

>
>
> On Fri, 4 Apr 2003, Joe Germuska wrote:
>
> > Date: Fri, 4 Apr 2003 11:03:41 -0600
> > From: Joe Germuska <Joe@Germuska.com>
> > Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> > To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> > Subject: Re: [beanutils] default converters for File and URL?
> >
> > >So once a DateConverter is made, is the 'proper' way to handle the
> > >"YY/DD/MM" style thing to have a custom Locale? Or should I pursue the
> > >idea of optional arguments being settable on converters?
> >
> > I think this has some promise.  After all, I can imagine using it via
> > a digester rule like
> > <set-property property="startDate" value="2003-04-04"
> > format="yyyy-MM-dd" />  This was part of the use case that started
> > our whole discussion.  I think setting a format explicitly is much
> > safer than counting on Locales.
> >
>
> The interesting part of this issue (and why there's no default
> DateConverter) is deciding what String format to use by default.  I would
> have leaned towards YYYY-MM-DD because that's what java.sql.Date does, but
> it's not particularly user friendly for input fields.

It's the only one that doesn't cause arguments :)

Probably it should try the Long, Medium then Short DateFormats based on
the default system Locale as the default. If it's still possible, it
should then try ISO-ish standards: YYYY-MM-DD HH:MM first, then
YYYY-MM-DD.

It should probably then stop there.

An opinion :)

Hen


---------------------------------------------------------------------
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