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