commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [beanutils] default converters for File and URL?
Date Thu, 10 Apr 2003 19:47:05 GMT
I just wanted to let you know that the desire to handle Date's seem pretty
popular!  There are two other recent posts under [betwixt] of people asking
for a converter for java.util.Date's.  Mine is under the subject: RE:
[betwixt] Strategies for roundtripping Date objects

In the short term, I have string's that look like this: Thu Apr 10 14:55:44
EDT 2003, which is what is produced by doing a Date.toString().  If I just
register my own converter, would that be picked up by betwixt

When you get the DateConverter made, I'll be happy to integrate it into
Betwixt with the approrpate tests.

Eric Pugh

-----Original Message-----
From: Eric Pabst []
Sent: Monday, April 07, 2003 9:52 PM
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?

It would be nice to have the DateConverter handle parsing multiple
DateFormat's, although it can of course have only one default format when
formatting.  The DateConverter could have a method:
    List getDateFormats()
which would be a "live" List and allow the caller to add to, remove from,
clear, re-order, etc. the List.  Each DateFormat should probably have
isLenient false in order for the DateConverter to try the next one if it is
not the exact format.  Order is very important between similar formats,
especially when no delimiters are involved, such as: MMDDYY and YYYYMMDD.

Eric Pabst

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message