Topic: Date & Time, Last Modified etc? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=13136" title="Pages that link to Topic: Date &amp;amp; Time, Last Modified etc? (Page 1 of 1)" rel="nofollow" >Topic: Date &amp; Time, Last Modified etc? <span class="small">(Page 1 of 1)</span>\

 
mjv
Bipolar (III) Inmate

From: Perth, Australia
Insane since: Aug 2000

posted posted 12-13-2000 15:11

Dear Doc (or anyone else who can help)

I am wanting to know how you get the last modified, current date, etc on the ozonedotcon.com site.

Was it using ssi?

Here is an exampe of what i am asking:

- Date & Time: Wednesday, December 13, 2000 02:08PM GMT -
- Last updated: Thursday, November 30, 2000 -

how was this achieved?

Thanks in advance

Phil
Bipolar (III) Mad Scientist

From: Eastbourne, UK.
Insane since: Mar 2000

posted posted 12-17-2000 23:31

Hi mjv!
The code you're referring to is the same as below, except that contents copyright is an addition. This code was taken from the Docs own site (Ozones.com), except that I've modified it slightly to suit my needs.
Doc is a Javascript master, and like you, I like the layout of the code... <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">
<TR>
<TD Colspan="6" ALIGN="CENTER"><B><font size=-1>Contents copyright ©2000 Scansped all rights reserved.<br></font>
<SCRIPT LANGUAGE = "JavaScript">
//This script courtesy of Doc Ozone. Feel free to borrow, but leave credit in scource.//
<!-- begin date and time script
document.write("<font size=-1>- The current date & time is ")
document.write(Date())
document.write("-<br>- This page last modified ")
document.write(document.lastModified)
document.write(" -</font><br>")
</SCRIPT>
</B>
</CENTER>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

My useage of it is on my splash page here

Hope this helps.

[This message has been edited by Phil (edited 19-12-2000).]

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 12-18-2000 15:29

Actually, that bit that's on the ozonesdotcon.com site is similar, but done in SSI instead. Nearly the same results, but the SSI is easier to drop in there. Not so good in theat the time for the SSI method is the time where the SERVER is, and the Javascript time is the time wherever the VIEWER happens to be. (I can think of advantages to either.) Here's the SSI code...

- Date & Time:
<!--#config timefmt="%A, %B %d, %Y %I:%M%p %Z" -->
<!--#echo var="Date_GMT" -->
-<br>

- Last updated:
<!--#config timefmt="%A, %B %d, %Y" -->
<!--#echo var="LAST_MODIFIED"-->
-<br>


Your pal, -doc-

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 12-18-2000 15:31

Hmm, thinking further on it, I can probably say that I've goten more "Gee Whiz!" comments from the Javascript version, as people are amazed that I know what time it is where *they* are. ("How did he do that?", they say.) The SSI version definitely rocks if you need or want to specify just how the date is spelled out, long version, short version, etc...

Your pal, -doc-

Phil
Bipolar (III) Mad Scientist

From: Eastbourne, UK.
Insane since: Mar 2000

posted posted 12-18-2000 16:50

Hehehe.....did I say master of Javascript.....the Doc rocks... <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

mjv
Bipolar (III) Inmate

From: Perth, Australia
Insane since: Aug 2000

posted posted 12-19-2000 08:34

Hey Doc & Phil
Thanks for your help.
I haven't decided what one i will use yet, but they are both very useful!
Doc: is there anything that you aren't the master of?
You are so great at all things!

Anyway, enough of the compliments for now

Thanks again Doc, and also Phil


TheTrixter
Bipolar (III) Inmate

From: Derbyshire, UK
Insane since: Jul 2000

posted posted 12-19-2000 21:10

Hey Phil, I tried that piece of Docs code, and I like it. One question, mine came out with a different format for the date. "This page last modified 12/19/2000 20:07:28"
How can I change it to use the date format dd/mm/yyy, or even better to use the same format as the current date and time.

Sorry to be a complete "thicko" but I have no idea with javascript.




[This message has been edited by TheTrixter (edited 19-12-2000).]

Phil
Bipolar (III) Mad Scientist

From: Eastbourne, UK.
Insane since: Mar 2000

posted posted 12-20-2000 08:52

No more a "thicko" than me Trix Like you, my knowledge of Javascript is minimal although I intend to get a handle around it over the coming weeks (probably months knowing me).
I tried playing with the Docs code to achieve what you're after - without success.
There are several other Date & Time scripts for what you want, but they're all really long winded, finishing up with reams of code that looks 'clunky' and incorperates everything bar the kitchen sink.
Sorry Trix, I think the Doc is going to be your saving grace on this one.

Digressing slightly, If you have a 'WaterStones' book shop near you, pop in and check out 'Javascript for the World Wide Web - 3rd Edition (Peachpit Press)' - Tom Negrino & Dori Smith. I bought a copy last Saturday (£13.99p ($20)- kinda early stocking filler) and it's brilliant. It explains (and shows) you why and how, with step by step examples (fully explained). However, it has one major plus, the authors have designed a web site (based on the book) as a sort of classroom add on.

Have a good one.....

TheTrixter
Bipolar (III) Inmate

From: Derbyshire, UK
Insane since: Jul 2000

posted posted 12-21-2000 07:11

Thanks Phil, I think I'll look out for that over the holidays, a bit of light bedtime reading (he he)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu