Add a method to select a time interval