private boolean validateSuffix(int field,int amount) throws IllegalArgumentException {
  SimpleDateFormat dateFormat=new SimpleDateFormat(getDebugSuffix());
  Calendar cal=getCalendarInstance();
  cal.setTimeInMillis(0);
  String initialSuffix=dateFormat.format(cal.getTime());
  cal.add(field,amount);
  String suffixAfterOneRotation=dateFormat.format(cal.getTime());
  return suffixAfterOneRotation.equals(initialSuffix);
}

private boolean validateSuffix ( int field , int amount ) throws IllegalArgumentException { SimpleDateFormat dateFormat = new SimpleDateFormat ( getDebugSuffix ( ) ) ; Calendar cal = getCalendarInstance ( ) ; cal . setTimeInMillis ( 0 ) ; String initialSuffix = dateFormat . format ( cal . getTime ( ) ) ; cal . add ( field , amount ) ; String suffixAfterOneRotation = dateFormat . format ( cal . getTime ( ) ) ; return suffixAfterOneRotation . equals ( initialSuffix ) ; }
validate suffix suffix need to be parse . this function check that the suffix is compatible with the rotation period .
