我在方法中有以下代码:
final String WEEK_OF_YEAR = "w";
GregorianCalendar calendar = new GregorianCalendar();
calendar.set(Calendar.WEEK_OF_YEAR, Integer.valueOf(get(WEEK_OF_YEAR)) + 1);
//The get(WEEK_OF_YEAR) returns the actual week of the year
DateFormat formatter = new SimpleDateFormat("EE, dd.MM.yyyy");
return formatter.format(calendar.getTime());
所以我想要的是获得下周String
的格式。"EE, dd.MM.yyyy"
所以看起来这calendar.getTime()
正在返回实际的一周......