JavaScript toTimeString() Method
Clash Royale CLAN TAG#URR8PPP
<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]-->
JavaScript toTimeString() Method
❮ JavaScript Date Object
Example
Convert the time portion of a Date object to a string:
var d = new Date();
var n = d.toTimeString();
<!--
The result of n will be:
var d=new Date();
document.write(d.toTimeString());
-->Try it Yourself »
Definition and Usage
The toTimeString() method converts the time portion of a Date object to a string.
Browser Support
Method | |||||
---|---|---|---|---|---|
toTimeString() | Yes | Yes | Yes | Yes | Yes |
Syntax
Date.toTimeString()
Parameters
None |
Technical Details
Return Value: | A String, representing the time as a string |
---|
❮ JavaScript Date Object