Split time range func