Copyright © tutorialspoint.com
Javascript Date() method returns today's date and time and does not need any object to be called
Date() |
Here is the detail of parameters:
NA
Returns today's date and time
<html> <head> <title>JavaScript Date Method</title> </head> <body> <script type="text/javascript"> var dt = Date(); document.write("Date and Time : " + dt ); </script> </body> </html> |
This will produce following result:
Date and Time : Wed Aug 27 2008 20:12:50 GMT+0530 (India Standard Time) |
To understand it in better way you can Try it yourself.
Copyright © tutorialspoint.com