How to get the current date in JavaScript (Time, Day, Month, Year)
To get the current date in JavaScript you’ll only need the Vanilla JavaScript Date API. All the information about the current date can be accessed in one line of code in various formats.