Fixed the buildXHR() funciton to use the correct date by adding one to getDate().