Calendar cal = .... //create your calendar instance
int thisDayOfWeek = cal.get(DAY_OF_WEEK);
if (thisDayOfWeek == Calendar.WEDNESDAY) {
//it is Wed.
}

解决方案 »

  1.   

    Calendar cal = .... //create your calendar instance for 2002年8月29号
    for (i=0;i<7;i++) {
      int thisDayOfWeek = cal.get(DAY_OF_WEEK);
      if (thisDayOfWeek == Calendar.WEDNESDAY) {
          //you get the first Wed after 29/8/2002
          Calendar firstWed = ... //create your calendar instance for (29/8/2002  + i days)
      }
      cal.add(1, Calendar.DATE);
    }//2ndWed is firstWed add 7 days
    //3rdWed is 2ndWed add 7 days
    ........