Fix date intervals