1date.toString('YYYY-MM-dd'); 'Tue Feb 10 2015 15:42:50'
2
3var date = new Date('4-1-2015');
4
5date.getDay();// returns 3
6
7date.getYear();// returns 115, no of years after 1900
8
9date.getFullYear();// returns 2015
10
11date.getMonth();// returns 3, starting 0 with jan
12
13date.getUTCDate();// returns 31