String today="2008-06-21";
String dayNames[] = {"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
SimpleDateFormat f =new SimpleDateFormat("yyyy-MM-dd");
Date d=f.parse(today);
Calendar cal = Calendar.getInstance();
cal.setTime(d);
int day= cal.get(Calendar.DAY_OF_WEEK);
String week_day = dayNames[day - 1];
posted on 2009-05-31 21:30
kelly 阅读(736)
评论(0) 编辑 收藏 所属分类:
java