Sets the UTC date's seconds

Description

setUTCSeconds(seconds)
Sets the UTC date's seconds. Setting the seconds to a number greater than 59 also increments the minutes.

Example


      var myDate = new Date();
      /* w w w.j av  a 2 s.co  m*/
      myDate.setUTCSeconds(12);
      console.log(myDate.toString());
      

The code above generates the following result.





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window