Javascript date getUTCSeconds() method returns the seconds in the specified date according to universal time. The value returned by getUTCSeconds() is an integer between 0 and 59.
Its syntax is as follows −
Date.getUTCSeconds()
Returns the month in the specified date according to universal time.
Try the following example.
<html> <head> <title>JavaScript getUTCSeconds Method</title> </head> <body> <script type="text/javascript"> var dt = new Date(); document.write("getUTCSeconds() : " + dt.getUTCSeconds() ); </script> </body> </html>
getUTCSeconds() : 13