ES6 - setTime() Method


Advertisements


Javascript date setUTCDate() method sets the day of the month for a specified date according to universal time.

Syntax

Date.setUTCDate(dayValue)       

Parameter

  • dayValue − An integer from 1 to 31, representing the day of the month.

Example

var dt = new Date( "Aug 28, 2008 23:30:00" );
dt.setUTCDate( 20 );
console.log( dt );       

Output

Wed Aug 20 2008 23:30:00 GMT+0530 (India Standard Time)       

es6_date.htm

Advertisements