Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > FAQ Topic - How do I format Last Modified date with javascript

Reply
Thread Tools

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

 
 
FAQ server
Guest
Posts: n/a
 
      11-09-2006
-----------------------------------------------------------------------
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.

 
Reply With Quote
 
 
 
 
Dr J R Stockton
Guest
Posts: n/a
 
      11-09-2006
In message <45526f86$0$49200$>, Thu, 9 Nov 2006
00:00:02, FAQ server <> writes
>-----------------------------------------------------------------------
>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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ Topic - How do I format the Last-Modified date with javascript? FAQ server Javascript 0 07-08-2007 11:00 PM
FAQ Topic - How do I format the Last-Modified date with javascript? FAQ server Javascript 1 05-08-2007 11:27 AM
FAQ Topic - How do I format the Last-Modified date with javascript? FAQ server Javascript 0 03-09-2007 12:00 AM
FAQ Topic - How do I format Last Modified date with javascript? FAQ server Javascript 0 01-06-2007 12:00 AM
FAQ Topic - How do I format Last Modified date with javascript FAQ server Javascript 0 09-11-2006 11:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57