Skip to content
Advertisements

JavaScript Date.getDate()

Why getDate ?

The JavaScript GetDate () method returns the day value of the specified date.

Syntax:

Date.getDate()

This function does not takes any parameter. It is just used along with a Date Object from which we want to fetch date of the month.

Return: Returns today’s date and time.


JavaScript getDate Examples

Example 1

        var date = new Date("February 04, 2019 13:30:00");
        console.log("Date.getDate() : " + date.getDate());

output:

4


Example 2

        let date = new Date();
        let now = date.getDate();
        console.log(now)

output:

5


Browser Support

Chromeyes
Edgeyes
Firefox1
Internet Exploreryes
Operayes
Safariyes
Android webviewyes
Chrome for Androidyes
Edge mobileyes
Firefox for Android4
Opera Androidyes
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: