Generic Date Calculation
I am working on a project where I am creating records depending on the date range chosen, Option Chosen and the pattern chosen.
By pattern I mean -> Daily,Weekly, Monthly, Yearly.
Date Range -> Start Date & End Date
Option Chosen -> Any numeric No. ex. 1,2,3,4
How it Works
1. I have chosen 'Monthly' Option
2. I have chosen '2' as Option which means every 2 Months
3. Start Date = 10/04/2008 End Date = 11/05/2008
This should give me a validation message:
"Date Range does not match Pattern and Option Chosen."
Reason: Since I have chosen for every 2 months means date range should be >= 2 * No. of days in the 2 months. Since date range between 10/04/2008 - 11/05/2008 is only 30 days which is less than 60 days no records would be created.
Kindly Help !!!