modify date logic