I'm calculating the difference between dates in a period. From today until previous days:
hoje = new Date();
periodo = new Date().setDate(hoje.getDate() - 5);
This way the output is as follows:
Fri Sep 19 2014 17:05:11 GMT-0300 (Local Standard Time)
1409861111749
I want the calculated date also to return as an object:
Fri Sep 14 2014 17:05:11 GMT-0300 (Local Standard Time)