public static void main(String[] args) throws ParseException {
//获取系统当前的日历
Calendar c = Calendar.getInstance();
//查看当前日历的星期几
int i = c.get(Calendar.DAY_OF_WEEK);
System.out.println(i);// 4 周三 周日为第一天1
int i1 =c.get(Calendar.DAY_OF_MONTH);//日
//获取指定时间的日历
String time = "2008-08-08";
Date d = new SimpleDateFormat("yyyy-MM-dd").parse(time);
c.setTime(d);
System.out.println(c.get(Calendar.DAY_OF_WEEK));//6
}