Reto wrote:
Hi,
Many web sites e.g. Writely show when the document was last changed.
Has anybody a javascript which converts a date time stamp into such a
textual representation?
It seems to me that that type of functionality should be done on the
server. If you use JavaScript and the client system date/time, you are
hoping that the clocks are reasonably synchronised. You also have to
ensure that the two timestamps are reduced to a common datum before
calcuating the difference.
If you try to avoid those issues by sending a current timestamp from
the server in addition to the timestamp for the document and then use
script to calculate the difference client-side, you might as well do
the maths on the server and just send the time difference.
If you want to go ahead with a JavaScript solution, pretty much
everything you need is here:
<URL:
http://www.merlyn.demon.co.uk/js-date0.htm >
--
Rob