Answers for "how to set the year of a date object in javascript"

2

JS date year

var d = new Date();

var n = d.getFullYear();
Posted by: Guest on February-08-2021
0

set year in javascript

var d = new Date();
d.setFullYear(2020);
Posted by: Guest on June-03-2021

Code answers related to "how to set the year of a date object in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language