On 28/02/11 12:56, Lew wrote:
> On 02/23/2011 11:42 AM, Mike Fowler wrote:
>>
>> * @param s a <code>String</code> object representing a date in
>> * in the format "yyyy-mm-dd"
>
> The Java 7 docs say:
> "s - a String object representing a date in in the format
> "yyyy-[m]m-[d]d". The leading zero for mm and dd may also be omitted."
> http://download.oracle.com/javase/7/docs/api/java/sql/Date.html
>
> So the java.sql.Date does accept single-digit month and day, at least
> for Java 7.
>
> All the work you did to reject single-digit month and day are not
> correct, if that's what you did.
>
It's not correct for Java 7 - but that isn't even out yet. I don't think
it's wise to have tests that break in 1.6 just because the API will
change in the not so distant future. Personally I think we should test
handling of the 1.7 API separately once it's available.
Regards,
--
Mike Fowler
Registered Linux user: 379787