1.Now I was trying to create a SimpleDateFormat that only contain weekday name, hour and minutes. I just defined a schema like this: DateFormat sdf = new SimpleDateFormat("EEE:hh:mm"); However, it seems like this pattern did not work at all;
2.Here is my code to define a date format, the code below can only contain hours and minutes, When I try to input "Tue:21:30", "Tue" will not be stored. How can defined a time format just like ""Tue 21:30""?
DateFormat sdf = new SimpleDateFormat("EEE:hh:mm");
Date date = sdf.parse("Tue:21:30");
Calendar cal = Calendar.getInstance();
cal.setTime(date);
int hours = 8;
int minutes =3000;
cal.add(Calendar.HOUR_OF_DAY, hours);
cal.add(Calendar.MINUTE, minutes);
date = cal.getTime();
System.out.println(date);
System.out.println(date.getDay());
System.out.println(date.getHours())