I’m looking for an easy javascript date clock to go on a web page. in the form:
24th September 2006
Anyone seen one?
var today = new Date(); var dd = today.getDate(); switch (dd) { case 1: 21: 31: dd+= 'st '; break; case 2: 22: dd+= 'nd '; break; case 3: 23: dd+= 'rd '; break; default: dd+= 'th ';} var month = ['January','February,'March','April','May','June','July','August','September','October','November','December']; dd += month(today.getMonth()) + ' ' + today.getFullYear(); document.write(dd);
[code=php] dd += month(today.getMonth()) + ' ' + today.getFullYear(); [/code]
[code=php] dd += month[today.getMonth()] + ' ' + today.getFullYear(); [/code]
Help @holliebelle spread the word by sharing this article on Twitter...