Month and Day Names
Thursday January 1, 2009
JavaScript doesn't supply all the date methods we are likely to need but we can easily add the missing ones ourselves
When you are displaying a date, the day of the week and month of the year are far better displayed as names rather than numbers (which day of the week is 3?, is 4/2/07 the 4th February or the 2nd April or even the 7th February 2004?). JavaScript doesn't actually supply methods for directly retrieving these names, presumably because they need to be different depending on which language you want them in. We can easily add our own methods to do this though for our selected language (I'll choose English).
Month and Day Names


No comments yet. Leave a Comment