Displaying date and time in basic html page

Soldato
Joined
6 Jan 2006
Posts
3,423
Location
Newcastle upon Tyne
Whats the best way to do it? Java script? Ive googled it but the only usefull returns are ones wanting you to link back to their site etc.

Thanks
 
Without any server side code, javascript is your only option - http://www.quackit.com/javascript/tutorial/javascript_date_and_time.cfm

The downside being, it takes the time and date from the browsing machine, so if they have their date set to Jan 1st 1066, that's what they'll see on your site. Not a problem if you're just adding a bit of fluff. Big problem if you're doing any validation based on date.
 
Back
Top Bottom