
I have the following as my known parameter Effective Date : 21-08-2012 Cut off day : Thursday I want my first cycle calculation done from 21-08-2012 till wednesday(22-08-2012) and from thursday my second cycle of calcultion starts
My question is how to find the date of Thursday
This cycle repeats based on every cut off day

Here is an example that displays the date of all the thursdays of the given year.
import java.util.*;
import java.text.*;
public class GetDateFromDay{
public String getDateOfWeekDay(int weekId, int year, int weekDay){
Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR, year);
cal.set(Calendar.WEEK_OF_YEAR, weekId);
cal.set(Calendar.DAY_OF_WEEK, weekDay);
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
System.out.println(sdf.format(cal.getTime()));
return sdf.format(cal.getTime());
}
public static void main(String args[]){
GetDateFromDay dt = new GetDateFromDay();
for (int weekCount = 1; weekCount <= 53; weekCount++) {
dt.getDateOfWeekDay(weekCount,2012,Calendar.THURSDAY);
}
}
}

But I have a problem here
My Frequency Start Date is 24-08-2012
My frequency end date - not defined
Calculation Frequency is Weekly(Sunday)
My calculation will be from 24-08-2012 to the following sunday
My question is how to find the following date of sunday
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.