The getUTCDate() method returns the day of the month ranged from 1 to 31 from the date object, according to universal time.
The getUTCDate() method returns the day of the month ranged from 1 to 31 from the date object, according to universal time.
UTC time is the same as GMT time.
Date.getUTCDate()
None
A Number, from 1 to 31, representing the day of the month
Return the day of the month, according to universal time:
//display the day of the month, according to UTC. var d = new Date(); var n = d.getUTCDate(); console.log(n);/* w w w. j a v a 2 s.c o m*/ //Return the UTC day of the month of a specific, local time, date-time: var d = new Date("July 21, 2010 01:15:00"); var n = d.getUTCDate(); console.log(n);