W3SChools ts how get date code example Example: javascript getdate var d=new Date(); d.getDate(); //returns the day of the month (from 1 to 31)