WDV221 Intro Javascript

Final Exam Project

Date Handling

One of the primary uses for Javascript is to process and display dates and times. We use the Javascript Date Object as the basis for a lot this processing. Make all changes to this page.

Please complete the following displays using your date functions as needed.

1. Display today's date as mm/dd/yyyy.

2. Display today's date as mm/dd/yy.

3. Display today's date as dd/mm/yyyy.

4. Display today's date as Day Month date, Year: Example: Monday January 3, 2011

5. Display a greeting in the greeting area.

  1. Display "Good Morning" if it is after midnight and before noon.
  2. Display "Good Afternoon" if it is after noon and before midnight.

6. Display January 3, 2014 as mm/dd/yyyy.

7. Display 8/15/2015 as dd/mm/yyyy.

Rubric: Points per task list above

0 Not attempted

2 Attempted

3 Displays a partially correct value

5 Display the correct value using functions that contain arrays with date information. Functions use a parameter to lookup the value.

Extra Credit:

1 point - Display this page's updated date:

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

2 points - Display a greeting of "Good Afternoon" if it is after noon and before 5pm. Change 'Good Evening' if it is after 5mp and before midnight.