

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the full year for a specified date according to universal time.
<p style="">JavaScript date setUTCFullYear() method sets the full year for a specified date according to universal time.</p><p style="">The following are the parameters for setUTCFullYear(yearValue[, monthValue[, dayValue]]) −</p><ul class="list"><li><strong>yearValue</strong> − An integer specifying the numeric value of the year, for example, 2008.</li><li><strong>monthValue</strong> − An integer between 0 and 11 representing the months January through December.</li><li><strong>dayValue</strong> − An integer between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also specify the monthValue.</li></ul><h2>Example</h2><p style="">You can try to run the following code to set the full year for a specified date according to universal time −</p><pre class="prettyprint notranslate"><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></pre>
- Related Questions & Answers
- Set the milliseconds for a specified date according to universal time.
- Set the seconds for a specified date according to universal time.
- Set the minutes for a specified date according to universal time.
- Set the month for a specified date according to universal time.
- Set the hour for a specified date according to universal time?
- Set the day of the month for a specified date according to universal time?
- How to return the day of the week in the specified date according to universal time?
- How to convert a date to a string using the universal time convention?
- How to set default date time as system date time in MySQL?
- Full Date Short Time ("f") Format Specifier in C#
- Full Date Long Time ("F") Format Specifier in C#
- How to set the xticklabels for date in matplotlib?
- Set current date and time to timestamp in MySQL
- Set search feature in MySQL for full text searching
- Set the Date and Time with Gregorian Calendar in Java
Advertisements