commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pabst" <>
Subject Re: [beanutils] default converters for File and URL?
Date Tue, 08 Apr 2003 01:51:48 GMT
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