This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS setFullYear()

The setFullYear() method can optionally set month and day.

Please note that month counts from 0. December is month 11:

const d = new Date();
d.setFullYear(2020, 11, 3);
document.getElementById("demo").innerHTML = d;