Node.js examples for Date:Year
Get tomorrow date and next year date
function tomorrow(){ var x = new Date(); x.setDate(x.getDate() + 1);/* ww w .j ava 2 s . co m*/ return x; } function nextYear(){ var x = new Date(); x.setDate(x.getDate() + 365); return x; } function addDay(d){ var x = new Date(); x.setDate(d.getDate() + 1); return x; } function sleep(delay){ var start = new Date().getTime(); while (new Date().getTime() < start + delay); }