Scott,
Because in the jdk, months go from 0-11. You should be able to get more
info. on this from the docs. for jdk1.1.
Erik Sahl
[EMAIL PROTECTED]
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Scott
> E Washburn
> Sent: Friday, May 28, 1999 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: Month discrepancy from Calendar object
>
>
> Does anybody know why I would be getting an incorrect month from the
> Calendar object?
> I'm using VA for Java 2.0 Enterprise JDK 1.1.6.
>
> Heres the code I'm using:
>
> Calendar MyCalendar = Calendar.getInstance();
> int iMonth = MyCalendar.get( Calendar.MONTH );
> int iDay = MyCalendar.get( Calendar.DATE );
> int iYear = MyCalendar.get( Calendar.YEAR );
>
> With the computer set to todays date 5/28/1999,
>
> I'm getting :
> iMonth = 4
> iDay = 28
> iYear = 1999
>
> Why would I be getting a 4 for the Month instead of 5.
> I've run this in several other machines and it returns the same thing.
>
> Please help?????
>
> __________________________________________________________________
> _________
> 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