PDA

View Full Version : Date Script



Floppyarms
04-09-2005, 06:10 PM
Complete novice here, i want a script to display the current date in the format: November 5, 2004


I have seen the script here: http://www.dynamicdrive.com/dynamicindex6/clock3.htm

but my attempts to edit it have all failed...

any kind fellow that can lend a hand would be a real stress-aid

tom

ddadmin
04-09-2005, 06:37 PM
Did you only want to display the current date and not the time as well? If so a script like this will do: http://www.javascriptkit.com/script/cut164.shtml

mwinter
04-09-2005, 11:31 PM
Complete novice here, i want a script to display the current date in the format: November 5, 2004
(function() {
var now = new Date(),
months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

document.write([
months[now.getMonth()], ' ',
now.getDate(), ', ',
now.getFullYear()
].join(''));
})();Mike