posted 20 years ago
Howdy. Here's some logic for ya:
Calendar start = GregorianCalendar set to 22/03/04
Calendar end = GregorianCalendar set to 22/03/03
int count = 0
while(start < end)
get day of week of date in start,
if day matches Calendar.SUNDAY increment count by one
increment start by one day
You'll have to decide whether to include the start and end days in the calculation, which means adjusting the start day and the comparison between start and end as appropriate.
Now get coding!
[ March 22, 2004: Message edited by: Carlos Failde ]