469,282 Members | 2,001 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

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

-----------------------------------------------------------------------
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.

Nov 8 '06 #1
1 2205
In message <45***********************@news.sunsite.dk>, Thu, 9 Nov 2006
00:00:02, FAQ server <ja********@dotinternet.bewrites
>-----------------------------------------------------------------------
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."

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Nov 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Dennis Marks | last post: by
7 posts views Thread by laredotornado | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.