use http req, tidy up date logic