Javascript Date getUTCDate()

Introduction

Javascript Date getUTCDate() returns the day of the month (1 through 31) according to universal time.

Return value

An integer number, between 1 and 31, representing the day of the month in the given date according to universal time.

var today = new Date();
var day = today.getUTCDate();
console.log(day);/*from  w  ww.j a va  2s. co  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);/* w  ww.  ja  v a 2  s. c  om*/



PreviousNext

Related