public boolean isTimestampWithinInterval(DateTime timestamp,String intervalString) throws IllegalArgumentException {
  Interval interval=Interval.parse(intervalString);
  return interval.contains(timestamp);
}

public boolean isTimestampWithinInterval ( DateTime timestamp , String intervalString ) throws IllegalArgumentException { Interval interval = Interval . parse ( intervalString ) ; return interval . contains ( timestamp ) ; }
returns true if the supplied timestamp is within the specified time interval . the supplied interval string should contain an iso 8601 formatted interval string and may be of the formats ' datetime / datetime ' , ' datetime / period ' or ' period / datetime '
