take date into consideration