Calendar.MONTH gives wrong value

后端 未结 6 1968
醉酒成梦
醉酒成梦 2020-12-19 01:14

I\'m trying to get the actual month from the Calendar using the following:

Calendar c = Calendar.getInstance();          
String time = String.v         


        
6条回答
  •  情书的邮戳
    2020-12-19 01:26

    I suggest trying

    @Override
    public void onSelectedDayChange(CalendarView view, int year, int month, int day) {
    Toast.makeText(getApplicationContext(), month+1 + "/" + day  + "/" + year, Toast.LENGTH_SHORT).show();
    calDate = month+1 + "/" + day + "/" + year; }
    });
    

提交回复
热议问题