Results 1 to 4 of 4
Thread: Calendar class issue
- 10-24-2010, 03:25 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Calendar class issue
I have the following line in the code:
int mmNow = Calendar.getInstance().get(Calendar.MONTH);
while debugging, I can see it is set to 9 not 10. How is that possible? Day and year show correct values of 24 and 2010....
System date is set correctly. Here is what I am getting in the shell:
C:\Documents and Settings\>date
The current date is: Sun 10/24/2010
Thanks!
- 10-24-2010, 03:51 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
It is to hard for you to read the API Doc? :eek:
MONTH
"The first month of the year in the Gregorian and Julian calendars is JANUARY which is 0"
-
Have a look at the Calendar API to see how months are represented. :)
- 10-24-2010, 06:36 PM #4
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
plz help me with this class, calendar
By hamed in forum New To JavaReplies: 6Last Post: 09-06-2010, 10:58 PM -
Calendar Pop-up issue
By jeeva in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 01-29-2009, 01:09 AM -
Issue in calendar display
By jeeva in forum New To JavaReplies: 1Last Post: 01-14-2009, 01:19 PM -
How to use Calendar class
By JavaBean in forum Java TipReplies: 1Last Post: 06-26-2008, 03:09 PM -
Gregorian calendar issue
By orchid in forum New To JavaReplies: 1Last Post: 05-16-2007, 06:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks