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 <[EMAIL PROTECTED]> > > Reply-To: Jakarta Commons Developers List <[EMAIL PROTECTED]> > > To: Jakarta Commons Developers List <[EMAIL PROTECTED]> > > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
