Edit: Thanks- I understand it a lot more now. Its very confusing when you first start! Thanks for the help. I am going to keep the question up as is ( in peril of more downvotes) as it might help others. There are some other libraries that everyone seems to recommend for date time
I am struggling with the Java calendar function- its seems to be returning wrong data the bottom figure should be a thursday according to calendar, but is returning as a saturday!
Calendar cal = new GregorianCalendar();
cal.set(2012,2,23); // 0 = January
String weekdays[]={"sunday","monday", "tuesday", "wednesday","thursday","friday","saturday",};
Integer Weekdaycurrent1=cal.get(Calendar.DAY_OF_WEEK);
System.out.println("today is a "+weekdays[Weekdaycurrent1]); //Prints today is Saturday, when it should be a thursday