how to programically get the week first day date like if today is wednesday 11/9/2013 programically get the date of monday that is 9/9/2013 is there any method to get first day of week using current date? mDay give me today day number i want using this number to get day of start of week that is monday
public static int mYear;
public static int mMonth;
public static int mDay;
Calendar mCalendar = Calendar.getInstance();
mYear = mCalendar.get(Calendar.YEAR);
mMonth = mCalendar.get(Calendar.MONTH) + 1;
mDay = mCalendar.get(Calendar.DAY_OF_MONTH);
how to use this function below
private static Date firstDayOfWeek(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.DAY_OF_WEEK, 1);
return calendar.getTime();
wht parameter i write when call function
firstDayOfWeek();?????
}