- getFullYear() – Provides current year like 2022.
- getMonth() – Provides current month values 0-11. Where 0 for Jan and 11 for Dec. So added +1 to get the result.
- getDate() – Provides day of the month values 1-31.
- getHours() – Provides current hour between 0-23.
- getMinutes() – Provides current minutes between 0-59.
- getSeconds() – Provides current seconds between 0-59.