Basic JavaScript Date and Time Functions
By Will Bontrager2004-08-12
The Printing
To print the date and time, use JavaScript to call the getCalendarDate() and getClockTime() functions. Then print the strings of characters they return. Example:
<script type="text/javascript" language="JavaScript"><!—
var calendarDate = getCalendarDate();
var clockTime = getClockTime();
document.write('Date is ' + calendarDate);
document.write('<br>');
document.write('Time is ' + clockTime);
//—></script>
Tutorial Pages:
» Basic JavaScript Date and Time Functions
» How To Extract Information From that Date Object
» The Date
» The Time
» The Printing
» The Complete Working Example
Copyright 2004 Bontrager Connection, LLC
