Anything that's going to take a date pattern needs a locale
as well, unless you're passing in the Calendar object.

The basic reason is that parsing a date may involve parsing
actual day and month names, which is locale dependant.  So just
passing in the pattern is not enough.  With a calendar, it contains
a Locale, so you would use that when building your DateFormat object.


-----Original Message-----
From: Emmanuel Bourg [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 2:16 PM
To: Jakarta Commons Developers List
Subject: [configuration] New getters for the Configuration interface


I'd like to suggest the addition of new getters to the Configuration 
interface. There are some types of properties that I use to put in my 
configuration files, I think that [configuration] could spare the burden 
of parsing them repeatedly.

The methods I would add are :

getLocale(String key, Locale defaultValue)

getURL(String key, URL defaultValue)

getDate(String key, String pattern, Date defaultValue)

getCalendar(String key, String pattern, Calendar defaultValue)

getInternetAddress(String key, InternetAddress defaultValue)

getInternetAddressArray(String key)


Emmanuel Bourg


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

Reply via email to