Updating date logic