private void adjustDayOfMonth(Calendar startTime,int month){
  applyLastDayOfMonth(startTime,month);
  if (!window.getLastDayOfMonth()) {
    int lastDayOfMonth=startTime.get(Calendar.DAY_OF_MONTH);
    if (lastDayOfMonth > getDayOfMonth()) {
      startTime.set(Calendar.DAY_OF_MONTH,getDayOfMonth());
    }
  }
}

private void adjustDayOfMonth ( Calendar startTime , int month ) { applyLastDayOfMonth ( startTime , month ) ; if ( ! window . getLastDayOfMonth ( ) ) { int lastDayOfMonth = startTime . get ( Calendar . DAY_OF_MONTH ) ; if ( lastDayOfMonth > getDayOfMonth ( ) ) { startTime . set ( Calendar . DAY_OF_MONTH , getDayOfMonth ( ) ) ; } } }
adjust the day of the month for the given month for a monthly window . if the day of the month is after the last day of the month , it is set to the last day of the month .
