corrects date ajax call for correct data