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.

Today's date is:

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

Today's date also is:

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

Today's date also is:

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

Today's date also is:

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.

January 3, 2014 can be written as:

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

8/15/2015 can be written as:

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:

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.