Ashik Mahmud
Mar 3, 2022

Today We will learn Javascript Date Format

1. This new Date() object gives the current date and time.

Current Date

2. This getDate() method returns the day from the specified date.

Find Date

3. This getMonth() method returns the month from the specified date.

Find Month and + 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.

Find Year

5.Now we can format the date various way Such as

Ashik Mahmud
Ashik Mahmud

No responses yet