I have a calendar picker that allows user to pick a start date and end dates.
I want to extract the day from a month, the old way to use getDay produces a wrong day from a month. Is there any other methods that I can use to get the date from a month and put it into an int type?
Date date_from = HolidayForm.pickerFrom.getDate();
Date date_to = HolidayForm.pickerTo.getDate();
//getDay is deprecated
int from = date_from.getDay();
int to = date_to.getDay();
//so i can do to find difference.
int diff = to-from;