Jason.
Look at 'tradeDate.set()'. The month is set as mm-1
--Olu E,
>
>
> Calendar tradeDate = Calendar.getInstance();
> tradeDate.set(yyyy, mm-1, dd);
> //tradeDate.setTime(tradeDate.getTime());
> System.err.println("Tradedate is " + tradeDate.getTime() +
> ", DAY_OF_WEEK = " + tradeDate.get(Calendar.DAY_OF_WEEK));
>
> -----Original Message-----
> From: Jason Hunter [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, August 16, 1999 1:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How do I submit a JDK bug?
>
> Emuleomo, Olu (PME) wrote:
> >
> > Sorry. Left ot the line
> >
> > int yyyy=1999;
> > int mm=08;
> > int dd=13;
>
> > Should print 6 for DAY_OF_WEEK (Friday). But it prints 0
> > (or some other number)
>
> Months are 0 based, so mm=08 is September. That's why you're not
> getting Friday. Days meanwhile are 1 based, so you're not seeing "0"
> there. Probably you get "2" for Monday.
>
> Don't ask me why it was designed this way. :-)
>
> Now let's get back to the discussion of servlets...
>
> -jh-
>
> --
> Jason Hunter
> [EMAIL PROTECTED]
> Book: http://www.servlets.com/book
> Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html