To fix getFullyear() is not a function with JavaScript, we should be called getFullYear instead.
For instance, we write
const start = new Date();
const y = start.getFullYear();
to call start.getFullYear to return the 4-digit year number of the start date.
Conclusion
To fix getFullyear() is not a function with JavaScript, we should be called getFullYear instead.