SimpleDateFormat bartDateFormat = new SimpleDateFormat("HH:mm ");
int month = cal.get(Calendar.MONTH)+1;
int date1 = cal.get(Calendar.DATE);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minute = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
int wek = cal.get(Calendar.DAY_OF_WEEK);
switch(wek){
case 1 :
mWek = getResources().getString(R.string.sunday);
break;
case 2:
mWek = getResources().getString(R.string.monday);
break;
case 3 :
mWek = getResources().getString(R.string.tuesday);
break;
case 4:
mWek = getResources().getString(R.string.wednesday);
break;
case 5 :
mWek = getResources().getString(R.string.thursday);
break;
case 6:
mWek = getResources().getString(R.string.friday);
break;
case 7 :
mWek = getResources().getString(R.string.saturday);
break;
}
Date date = new Date();
String mTime = bartDateFormat.format(date);
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);int month = cal.get(Calendar.MONTH)+1;
int date1 = cal.get(Calendar.DATE);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int minute = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
int wek = cal.get(Calendar.DAY_OF_WEEK);
switch(wek){
case 1 :
mWek = getResources().getString(R.string.sunday);
break;
case 2:
mWek = getResources().getString(R.string.monday);
break;
case 3 :
mWek = getResources().getString(R.string.tuesday);
break;
case 4:
mWek = getResources().getString(R.string.wednesday);
break;
case 5 :
mWek = getResources().getString(R.string.thursday);
break;
case 6:
mWek = getResources().getString(R.string.friday);
break;
case 7 :
mWek = getResources().getString(R.string.saturday);
break;
}