Re: Bogus Gregorian Calendar
Re: Bogus Gregorian Calendar
- Subject: Re: Bogus Gregorian Calendar
- From: steve stout <email@hidden>
- Date: Thu, 17 Jun 2004 18:54:47 -0700
From
<http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MONTH>
public static final int MONTH
Field number for get and set indicating the month. This is a
calendar-specific value. The first month of the year is JANUARY which
is 0; the last depends on the number of months in a year.
On Jun 17, 2004, at 6:39 PM, Greg Hulands wrote:
Hi,
I am getting the current date by doing:
GregorianCalendar now = new GregorianCalendar();
But the only thing is that it is not using the correct month.
I logged it to the console and got this. The month is 5 not 6.
java.util.GregorianCalendar[time=1087522528940,areFieldsSet=true,areAll
FieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Austral
ia/
Brisbane",offset=36000000,dstSavings=0,useDaylight=false,transitions=18
,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=20
04,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=
170,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=11,HOUR_OF_DAY=11
,MINUTE=35,SECOND=28,MILLISECOND=940,ZONE_OFFSET=36000000,DST_OFFSET=0]
Yes the date in the computer is set correctly so it can't be the
problem. Is there a bug in GregorianCalendar?
Any info is appreciated.
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
///---------------------------------------
steve stout
web coordinator
arizona student unions
52o.626.o1o9
http://www.union.arizona.edu
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.