Code Snippits
Find the Day of a Date
To help sell our personalised newspapers it can be useful to allow customers to find the day a particular date fell on.
The JavaScript below shows how this can be achieved usign the date object.
var date = new Date();
var day = date.getDay(); // this example uses todays date, add the user selected date here
var name = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][day];
alert(name);
×