Hi everyone, how to create dates if start date and end date are specified in java?
as below:
Ex: if start date is 15-04-2012 and end date is 15-06-2012 having this, I want the dates to be as below, and saturday and sunday should omit the list
1.15-04-2012, 2.16-04-2012, 3.17-04-2012, . . . . . 15-06-2012
I did the following, but will be generated within one month if the date range is one month. `
public static ConcurrentHashMap<String, String> getWorkingDaysMap(int year, int month, int day){ int totalworkingdays=0,noofdays=0; String nameofday = ""; ConcurrentHashMap<String,String> workingDaysMap = new ConcurrentHashMap<String,String>(); Map<String,String> holyDayMap = new LinkedHashMap<String,String>(); noofdays = findNoOfDays(year,month,day); for (int i = 1; i <= noofdays; i++) { Date date = (new GregorianCalendar(year,month - 1, i)).getTime();
So please help me how to do this.
Relationship tony
source share