WDV221 Intro Javascript

Javascript Date Object - In Class Exercises


Please complete the following exercises on this page. When complete post the page to your WDV221 folder on the server. Make a link in your WDV221 Intro Javascript page for this assignment. Contact your instructor and demonstrate that you have completed the assignment.

Using Blackboard complete the In Class Exercise Assignment. Download your Homework project and being working on it with your remaining time.

For each exercise use a comment line to put the Exercise number within the script. Also place a short description of what the script is doing.


Use a runtime script and document.write( ) to output the requested results.

Create and display a new Date object called today with today's date. Today is:

Create and dispaly a new Date object called yesterday, with yesterday's date. Yesterday is:

Create and display a new Date object called tomorrow, with tomorrow's date. Tomorrow is:

Create and display a new Date object called oneWeek with the date one week from today. One week from today is:

Create and dispaly a new Date object called tenDays with the date 10 days from today. 10 Days from today is:

Format today's date into mm/dd/yyyy and display: (Hint: get the individual pieces from the date object and concatenate them together with the slashes)

Format today's date into dd/mm/yyyy and display: (Hint: get the individual pieces from the date object and concatenate them together with the slashes)

Special Date!

Page last modified: (display the date that this page was last changed) (Hint: Not part of the Date object)