Last Updated

This is essentially a very simple script, to show when a page was last updated.

The following basic formats are available:

"shortUK" 05/02/01
"shortUS" 02/05/01
"longUK" 5 February 2001
"longUS" February 5 2001
"longUKend" 5th February 2001
"longUSend" February 5th 2001
"sentence" 5th of February 2001
"daysUK" Monday 5th February 2001
"daysUS" Monday February 5th 2001
"bluntUK" Monday 5 February 2001
"bluntUS" Monday February 5 2001
"sentenceUK" Monday the 5th of February 2001
"sentenceUS" Monday February the 5th 2001
"biblical" Monday, the fifth day of February, in the year of Our Lord two thousand and one
"casual" last month
"mysterious" a mystic cycle of rotations fore
"literal" 3 weeks, 6 days, 12 hours, 14 minutes and 11.685 seconds ago
"random" ...

You can choose whether to display the year, by setting the variable

var showyear = true (or false)

but this will have no effect if you choose "casual", "mysterious", "literal", or "random".

You can also customise the initial message - Last updated: - and then specify the font, size, color and boldness.

Please note:

  • "biblical" format will only work until the year 3000
  • "literal" format uses weeks as its largest unit

  • If your pages use server-side includes, as this one does, the script will only return the date and time the page was parsed, because such pages don't have a client-accessible last modified header. I got round this, for the purpose of demonstrating the script, by displaying the examples inside iframes/layers drawn from a non-parsed page. If you use SSI on your site, you have no need for this script anyway because you can query environment variables to achieve the same result - Check this out for more information.
 

Paste this code into the <BODY> section, wherever you want the date to appear

You might be thinking this is rather a lot of code just to write one line. And you'd be right - it's 11½ K.

So here's the options - if your existing page can handle the extra load, you can use the code above and retain all formatting options. However if you only want a single, fixed format, then use the code wizard below to get the necessary script. You will still be able to change the display characteristics afterwards.

Code wizard

Paste it into the <BODY> section, wherever you want the date to appear

If you prefer, you can get these scripts directly from their directory. Each is available as a .htm file, with the script written into the page, or as a plain text file which Internet Explorer will execute, and other browser simply display. Click here for that.

Home | Music | Cooking | Samples | Gear | Library | Links | Contact