fix days back javascript calculation