getSeconds()
Date
instance method getterS2C Home
« Globals « Date « getSeconds()
Description
Returns the locale specific second of the minute (0-59) for the specified date.
Syntax
Signature | Description |
---|---|
aDate.getSeconds() | Returns the locale specific second of the minute (0-59) for the specified date. |
Parameters
None.
Examples
The code below shows an example of the getSeconds()
method of Date
.
// Create a Date instance for the current date and time.
var todaysDate = new Date();
alert(todaysDate);
// Get seconds of the minute.
alert(todaysDate.getSeconds() + ' = Second of the minute');
Related Tutorials
JavaScript Intermediate Tutorials - Lesson 2 - Dates and Times