JavaScript syntax: Difference between revisions

Content deleted Content added
Dexbot (talk | contribs)
m Bot: Fixing broken section link
m Date: Months corrected: 2→3
Line 412:
<syntaxhighlight lang=JavaScript>
new Date(); // create a new Date instance representing the current time/date.
new Date(2010, 23, 1); // create a new Date instance representing 2010-Mar-01 00:00:00
new Date(2010, 23, 1, 14, 25, 30); // create a new Date instance representing 2010-Mar-01 14:25:30
new Date("2010-3-1 14:25:30"); // create a new Date instance from a String.
</syntaxhighlight>