code: public void seekToDayOfWeek(String direction, String seekType, String seekAmount, String dayOfWeek) {
      int dayOfWeekInt = Integer.parseInt(dayOfWeek);
      int seekAmountInt = Integer.parseInt(seekAmount);
      assert(direction.equals(DIR_LEFT) || direction.equals(DIR_RIGHT));
      assert(seekType.equals(SEEK_BY_DAY) || seekType.equals(SEEK_BY_WEEK));
      assert(dayOfWeekInt >= 1 && dayOfWeekInt <= 7);
      
      markDateInvocation();
      
      int sign = direction.equals(DIR_RIGHT) ? 1 : -1;
      if(seekType.equals(SEEK_BY_WEEK)) {
        // set our calendar to this weeks requested day of the week,
        // then add or subtract the week(s)
        _calendar.set(Calendar.DAY_OF_WEEK, dayOfWeekInt);
        _calendar.add(Calendar.DAY_OF_YEAR, seekAmountInt * 7 * sign);
      }
      
      else if(seekType.equals(SEEK_BY_DAY)) {
        // find the closest day
        do {
          _calendar.add(Calendar.DAY_OF_YEAR, sign);
        } while(_calendar.get(Calendar.DAY_OF_WEEK) != dayOfWeekInt);
        
        // now add/subtract any additional days
        if(seekAmountInt > 0) {
          _calendar.add(Calendar.WEEK_OF_YEAR, (seekAmountInt - 1) * sign);
        }
      }
    }
docs: seeks to a specified day of the week in the past or future.
  
  @param direction the direction to seek: two possibilities
  '<' go backward
  '>' go forward
  
  @param seekType the type of seek to perform (by_day or by_week)
  by_day means we seek to the very next occurrence of the given day
  by_week means we seek to the first occurrence of the given day week in the
  next (or previous,) week (or multiple of next or previous week depending
  on the seek amount.)
  
  @param seekAmount the amount to seek.  Must be guaranteed to parse as an integer
  
  @param dayOfWeek the day of the week to seek to, represented as an integer from
  1 to 7 (1 being Sunday, 7 being Saturday.) Must be guaranteed to parse as an Integer