Javatpoint Logo
Javatpoint Logo

JavaScript Date getUTCDate() method

The JavaScript date getUTCDate() method returns the day for the specified date on the basis of universal time.

Syntax

The getUTCDate() method is represented by the following syntax:

Return

An integer value between 1 and 31 that represents the day of the specified date.

JavaScript Date getUTCDate() method example

Here, we will understand getUTCDate() method through various examples.

Example 1

Let's see an example to print today's date according to universal time.

Test it Now

Output:

Today's day: 8 

Example 2

Let's see an example to print the day from the given date according to universal time.

Test it Now

Output:

Date value1 : 15
Date value2 : 16
Next TopicJavaScript Date




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA