By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,499 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

Printing modification date

P: n/a
I am working on some documentation in html format and I would really like to display
the date the html file, itself was modified. I am writing my documentation in vi and
the html server involved is Apache.

This is a conversion effort from MS Frontpage 2000. In Frontpage, there's a feature
that allows the document's modification date to be displayed in the document, but I
tried this with a javascript that I downloaded via the Internet, but it returns
incorrect information.

Does anyone know a simple way to include the modification date in an html document?
Maybe an example page that I could look at?
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
st**@temple.edu wrote:
I am working on some documentation in html format and I would
really like to display the date the html file, itself was modified.
Try this:
<div>Last modified 2004-02-03.</div>
No, you cannot reliably automate it. Only you can know when you have
really modified the document. Normally, updating the date takes one
hundredth or less of the time needed for the actual modification.
Otherwise the modification is probably not worth doing, or worth being
recorded in the modification date.
I am writing my documentation in vi and the html server involved is
Apache.


Apache sends the HTTP header Last-Modified anyway, so anyone really
interested in knowing the exact moment of time of uploading the
document onto the server, or modifying it there, can get the
information, at least after getting a decent browser (e.g., using
control-i on Mozilla.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

P: n/a
It seems "" wrote in comp.infosystems.www.authoring.html:
I am working on some documentation in html format and I would really like to display
the date the html file, itself was modified. I am writing my documentation in vi and
the html server involved is Apache.


vi, or Vim? In Vim you can use functions: there's getftime() to get
the files timestamp, and strftime() to convert it to a human-
readable format. You could set up an auto-execute macro to find the
old date and change it to the actual new date.

Vim is a free (well, charityware) enhanced version of vi:
http://www.vim.org

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #3

P: n/a
On 3 Feb 2004 16:50:26 GMT, st**@temple.edu wrote:
I am working on some documentation in html format and I would really like to display
the date the html file, itself was modified. I am writing my documentation in vi
Saving this info into the HTML file itself automatically would require
some pre-save processing, it seems. I don't know vi well enough to know
if it is capable of doing this. An alternative could be a cleverly
constructed macro, if vi supports macro's, that updates the
last-modified date present in the file to today. If you've marked up the
date in a distinguishable way, this should not be too difficult.
and the html server involved is Apache.


In that case, if you can use server side includes, you may want to
consider that.

http://httpd.apache.org/docs/howto/s...ndateofthefile

Gertjan.

--
Gertjan Klein <gk****@xs4all.nl>
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.