adding IntervalType enum as suggested (with a few changes - it didn't ha...

...ve SECOND for example). Very clean now