January 2001
Beginner
312 pages
6h 4m
English
The Date object offers you a wealth of date-related properties and methods.
To use the Date object, the first thing you must do is to assign it a variable name (similar to how you use the Array object):
<script language="JavaScript"> <!-- Cloaking device on! dateVar = new Date(); // Cloaking device off --> </script>
Now that you have done this, you can start to use the Date object.
NOTE
Using new Date() with no arguments returns the current date and time to which the system is set.
NOTE
The range of dates that can be represented in a Date object is approximately 285,616 years on either side of January 1, 1970!
The first thing you can try out is retrieving the full year using the getFullYear method ...
Read now
Unlock full access