FAQ Topic - How do I format Last Modified date with javascript

F

FAQ server

-----------------------------------------------------------------------
FAQ Topic - How do I format Last Modified date with javascript
-----------------------------------------------------------------------

Apparently, « new Date() » reads it correctly, though problems
can occur if the browser returns only two digits for the year.
In particular, time zone, field order and separators may vary.
It is also reliant on the server's clock having been correctly
set at the time of upload. See the URL
below.

http://www.merlyn.demon.co.uk/js-date2.htm#lM


===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.
 
D

Dr J R Stockton

Thu said:
-----------------------------------------------------------------------
FAQ Topic - How do I format Last Modified date with javascript
-----------------------------------------------------------------------

Apparently, ‹ new Date() › reads it correctly, though problems
can occur if the browser returns only two digits for the year.
In particular, time zone, field order and separators may vary.
It is also reliant on the server's clock having been correctly
set at the time of upload. See the URL
below.

http://www.merlyn.demon.co.uk/js-date2.htm#lM


That's correct, IMHO. But I think it gives insufficient stress to
variations between browsers.

"The format of the document.lastModified string is browser-dependent. In
particular, time zone and indication, field order and separators may
vary. Doubtless ‹ new Date(dlM) › will understand the format, but
error can occur if the browser returns only two digits for the year.
Validity is also reliant on the server's clock having been correctly set
at the time of upload. See the URL below."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top