classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.util.Date mess


From: Ka-Hing Cheung
Subject: Re: java.util.Date mess
Date: Mon, 11 Oct 2004 08:26:04 -0700

On Mon, 2004-10-11 at 15:39 +0200, Jeroen Frijters wrote:
> Hi,
> 
> I have some code that depends on unspecified behavior of java.util.Date.
> In the Sun JDK if you pass out of range parameters to the Date
> constructors that take year, month, date, etc. it will automatically
> convert to a valid date (for example, new Date(104, 8, 41) is Oct 11,
> 2004.)

Is that unspecified? The javadoc says:

"In all cases, arguments given to methods for these purposes need not
fall within the indicated ranges; for example, a date may be specified
as January 32 and is interpreted as meaning February 1."

-khc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]