Hi all, a small section of my program is as follows
<code>
GregorianCalendar gc = new GregorianCalendar();
boolean less=false;
Calendar now = gc.getInstance();
int hr = now.get(Calendar.HOUR);
int dy=now.DAY_OF_MONTH;int dy2=now.DATE;
int min = now.MINUTE;
int ye=now.YEAR;int mo = now.MONTH;
System.out.println(now);
System.out.println(ye+" YEAR "+ mo+ " MONTH "+dy+" DAY "+min + " MINUTE"
</code>
This code outputs
java.util.GregorianCalendar[...ERA=1,YEAR=2003,MONTH=8,
WEEK_OF_YEAR=38,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,
DAY_OF_YEAR=261,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,
AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=46,...]
1 YEAR 2 MONTH 5 DAY 12 MINUTE
Any ideas why these bogus reading are being outputted? Last time I checked it isn't Year 1!
<code>
GregorianCalendar gc = new GregorianCalendar();
boolean less=false;
Calendar now = gc.getInstance();
int hr = now.get(Calendar.HOUR);
int dy=now.DAY_OF_MONTH;int dy2=now.DATE;
int min = now.MINUTE;
int ye=now.YEAR;int mo = now.MONTH;
System.out.println(now);
System.out.println(ye+" YEAR "+ mo+ " MONTH "+dy+" DAY "+min + " MINUTE"
</code>
This code outputs
java.util.GregorianCalendar[...ERA=1,YEAR=2003,MONTH=8,
WEEK_OF_YEAR=38,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,
DAY_OF_YEAR=261,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,
AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=46,...]
1 YEAR 2 MONTH 5 DAY 12 MINUTE
Any ideas why these bogus reading are being outputted? Last time I checked it isn't Year 1!