Change date logic to use only JS Date objects throughout