日期:2014-05-20 浏览次数:20767 次
String dateString = "2013-07-28";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = sdf.parse(dateString);
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int weekOfMonth = calendar.get(Calendar.WEEK_OF_MONTH);
System.out.println(weekOfMonth);