.getUTCMinutes()

Anonymous contributor's avatar
Anonymous contributor
Published Jun 14, 2023
Contribute to Docs

The .getUTCMinutes() method returns the minutes for the date provided according to Coordinated Universal Time (UTC).

Syntax

myDate.getUTCMinutes()

The .getUTCMinutes() method returns the minutes as an integer between 0 and 59 for the provided date, myDate, according to UTC time.

Example

The following example uses the .getUTCMinutes() method to get the minutes of 2023-06-13T16:27:00.175Z and logs the result to the console:

const myDate = new Date('2023-06-13T16:27:00.175Z');
const minutes = myDate.getUTCMinutes();
console.log(minutes);

This outputs the following:

27

All contributors

Contribute to Docs

Learn JavaScript on Codecademy