Mar 3, 2022
Today We will learn Javascript Date Format
1. This new Date() object gives the current date and time.
2. This getDate() method returns the day from the specified date.
3. This getMonth() method returns the month from the specified date.
+ 1 because month starts from 0
One is added because getMonth() start from the 0. So here the month is
January = 0
February = 1
March = 2
April = 3
May = 4
June = 5
July = 6
August = 7
September = 8
October = 9
November =10
December = 11
4. This getFullYear() returns the year from the specified date.
5.Now we can format the date various way Such as