Skip to content
Advertisements

JavaScript Date.getMinutes()

Why getMinutes ?

JavaScript Date The getMinutes () method makes the conversion according to the specified date. On this acre, it rotates the minute (returns 0 to 59 minutes of the specified date and time).

Syntax:

Date.getMinutes()

return: Returns the minutes in the specified date according to local time.


JavaScript getMinutes Examples

Example 1

The JavaScript Date getMinutes () method can return minute of the current time.

        var now = new Date('July 21, 1983 01:15:22');
        console.log(now.getMinutes());

15


Example 2

The JavaScript Date getMinutes () method returns the minute of the specified time.

        var date = new Date('July 21, 1983 22:47:55');
        console.log(date.getMinutes());

47


Example 3

Returns 0 if we don’t enter minutes.

        var date = new Date('July 21, 1983 ');
        console.log(date.getMinutes());

0


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: