Java Calendar date interval
Posted on 2009-02-20
Can someone please provide me code to help me achieve the following:
Given any date (example: 02-12-2009), I'd like to return String array where the first value of the array is the first date in the associated week (02-08-2009) and the second value is the last date in the associated week (02-14-2009). This would be based on a week that starts on Sunday and ends on Saturday every time. Also, I need this to work during leap years and non-leap years. Thanks for your help.