Display of today's date on webpage, UK time/format - pls help prom

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello – first post here, so I hope this goes through…

I hope someone can help – I am looking for a way/script to display the
following date:

“Site updated: 12th October 2005â€

in British format GMT timezone, formatted as above and with an automatic
update to reflect today's date say update every midnight – or even better, at
10am every morning UK time.

All the scripts I have found is US format or strange formatting – please
help prompt, thanks and best wishes
Tatia
 
hmm...you don't want to move to the US.

To get this style: Wednesday, 12 October, 2005
using vb script running it on the server

str= WeekDayName(WeekDay(Now())) & ", " & Day(Now()) & " " &
MonthName(Month(Now())) & ", " & Year(Now())
reponse.write ("Site Site updated: " & str)

You have to do w/o the suffix th unless you want 1th, 2th,3th.

For javasdvipt google "javascript today's date UK" w/o quotes.
...Pc
 
Hi p c

Thanks for your prompt reply, a good point you made ref the th! However I
am still confused… and not familiar with vb coding… Sorry to be dim, but
how do I install this!? I did a quick search in Google to no result and its
slow – I am on a mobile connection! in Spain! hence I have hoped for a quite
cut & paste solution.

Thanks in anticipation of a cut and paste solution!

Tatia
 
Does the server/ISP (where you will store your pages) support script?
What language?

Post a URL to the site.
...PC
 
Hi p c

Thanks for your continued interest/support - below the tech spec for the
server, hope this is of help?!

Server software includes:
Operating system
RedHat linux 7.3
Web server
Apache 1.3.27
Scripting language
PHP 4.3.10
Scripting language
SunONE ASP 3.6.2
CGI Scripting language
Perl 5.6.1
Database server
MySQL 3.23.56
Mail server
Exim 3.36


Thanks! Tatia

--------------------
 
Hi Tatia,

Here is a *client-side* solution.
It is a complete html file which does nothing but display the current local
time.

You can paste everything between <head> and </head> into anywhere in your
head section.

You can modify your <body> statement so that it looks like
<body onload="gettime()">
Other items may be present on the body statement. Just leave these and make
sure that onload="gettime()" is present. If any other onload functions are
there, just add ';gettime()' after these (without the quotes)
e.g.
<body onload="fn1();fn(2);....;gettime()">

The statement:
Current Date: <span id="clock"></span>
can be anywhere bwteen <body> and </body>

<!-- Start of code
<html>
<head>
<script type="text/javascript">
function getTheDate()
{ var now = new Date()
return now.toLocaleDateString()}
function getTheTime()
{ var now = new Date()
return now.toLocaleTimeString()}
function DateTime()
{ var cdate = '<b class="red">'
+ getTheDate() + " "
+ getTheTime() + "</b>"
if (document.all)
document.all.clock.innerHTML = cdate
else
if (document.getElementById)
document.getElementById("clock").innerHTML = cdate
else
document.write(cdate) }
function gettime()
{ setInterval("DateTime()",1000) }
</script>
</head>
<body onload="gettime()">
Current Date: <span id="clock"></span>
</body>
</html>
End of code -->
 
Back
Top