Skip to navigation
Get the date for 6 month ago and convert it to string in javascript
28.09.15
var d = new Date(); d.setDate(d.getDate() -180); var date = padStr(d.getFullYear()) + padStr(d.getMonth()+1) padStr(d.getUTCDate()); function padStr(i) { return (i < 10) ? "0" + i : "" + i; }
http://stackoverflow.com/questions/5914020/javascript-date-to-string
Reply
Anonymous
Information Epoch 1715086019
Save trees.
Home
Notebook
Contact us