.DAY_OF_WEEK always returns 7
Hi there, I'm setting a calendar to a date that's pulled from an array of results of a MySQL query stored in events[y].
The problem is this: If I add in System.out.println(eventdatecal); I can see that the DAY_OF_WEEK variable changes depending what date I get from events[y] and it's correct. But as soon a I try and pass it into xindex and System.out.println(xindex); it returns 7, every time. Am I doing something really silly or am I right in thinking this makes no sense?
GregorianCalendar eventdatecal = new GregorianCalendar(TimeZone.getTimeZone("Europe/London"),Locale.UK);
Date eventdatesimple = simpledateform.parse(events[y]);
System.out.println(eventdatecal); /*This returns 0->6, Sun->Sat for .DAY_OF_WEEK*/
int xindex = eventdatecal.DAY_OF_WEEK;
System.out.println(xindex);/*But this always returns 7 :@*/