getting the wrong end time value (goes beyond to 60mins)
I am working on the calendar view. When I click an empty view I need to get the start time and end time I am getting start time properly but end time is going beyond 60 minutes
Eg: 4:69pm, 4:79pm
I need as 5:09pm, 5:19pm
Please check my code, when I add 60 minutes, it is going beyond 60 minutes
mWeekView.setEmptyViewClickListener(new
WeekView.EmptyViewClickListener() {
@Override
public void onEmptyViewClicked(Calendar time) {
String startTime = String.format("%02d:%02d",time.get(Calendar.HOUR_OF_DAY),time.get(Calendar.MINUTE));
String endtime = String.format("%02d:%02d",time.get(Calendar.HOUR_OF_DAY),60+time.get(Calendar.MINUTE));/*time.getTimeInMillis()+60*60*1000*/
String startdate = String.format("%d/%s/%s",time.get(Calendar.DAY_OF_MONTH),time.get(Calendar.MONTH)+1,time.get(Calendar.YEAR));
Intent intent = new Intent(getActivity(),AddAppointment.class);
intent.putExtra("daystartdate", startdate);
intent.putExtra("daystartTime",startTime);
intent.putExtra("dayendtime",endtime);
startActivity(intent);
}
});