Ka-Hing Cheung wrote:
> On Mon, 2004-10-11 at 15:39 +0200, Jeroen Frijters wrote:
> > 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."

Thanks, I had overlooked that part at the top. The individual methods
all say:

Parameters:
  year - the year minus 1900.
  month - the month between 0-11.
  date - the day of the month between 1-31

So I assumed that these were the only valid inputs.

Regards,
Jeroen


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to