Mega Code Archive

 
Categories / JavaScript Tutorial / Date
 

Date setUTCDate()

Syntax date.setUTCDate(day) The setUTCDate() method sets the day of the month in the Date object to the argument day, an integer from 1 to 31 universal time. The method returns an integer representing the number of milliseconds between midnight January 1, 1970 (GMT) to the new date. <html>     <script language="JavaScript">     <!--     theDate = new Date();     document.write("Initial milliseconds=",theDate.getTime());     document.write("<br>setUTCDate returned ");     document.write(theDate.setUTCDate(6)," milliseconds.")     document.write("<br>Final milliseconds=",theDate.getTime());     -->     </script>     </html>