计算500天以后的是星期几,是当月的第几个星期
如题,帮忙写个,发上来,谢谢
------解决方案--------------------
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_YEAR, 500);
System.out.println(calendar.getTime());
switch (calendar.get(Calendar.DAY_OF_WEEK)) {
case Calendar.SUNDAY:
System.out.println("SUNDAY");
break;
case Calendar.MONDAY:
System.out.println("MONDAY");
...
default:
break;
}
System.out.println(calendar.get(Calendar.DAY_OF_WEEK));
System.out.println(calendar.get(Calendar.WEEK_OF_MONTH));