changing duration to defined periods in time