Perhaps it is better to throw an exception if it is an unrecognized interval. Fail fast, fail hard..