JavaScript date setUTCFullYear() method sets the full year of the specified date according to Coordinated Universal Time. The parameters of the
setUTCFullYear(yearValue[, monthValue[, dayValue]]) method are as follows:
<html> <head> <title>JavaScript setUTCFullYear Method</title> </head> <body> <script> var dt = new Date( "Aug 28, 2012 23:30:00" ); dt.setUTCFullYear( 2018 ); document.write( dt ); </script> </body> </html>
The above is the detailed content of Sets the complete year for the specified date, according to UTC. For more information, please follow other related articles on the PHP Chinese website!