我在尝试让日期在我的应用程序中正确显示时遇到了麻烦,这是代码
//i declare the calendar called now
private Calendar now;
//i set up the calendar with what i believe could be the problem in setting up the wrong date
now = Calendar.getInstance();
now.set(Calendar.MONTH, Calendar.MONTH);
now.set(Calendar.DAY_OF_MONTH, Calendar.DAY_OF_MONTH);
now.set(Calendar.DAY_OF_WEEK, Calendar.DAY_OF_WEEK);
//whatDay being a textview, is asked to display the date
whatDay.setText(DateFormat.format("E, dd MMMM", now));
目前,就显示日期而言,一切正常 - 只有它显示错误的日期,这有点问题