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

Javascript will not display date correctly in FIREFOX, ok in EXPLORER

P: n/a
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim

Jul 23 '05 #1
Share this Question
Share on Google+
34 Replies


P: n/a
<kr****@princeton.edu> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim


Change
year = now.getYear();
to
year = now.getFullYear();
Jul 23 '05 #2

P: n/a
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:ob********************@comcast.com...
<kr****@princeton.edu> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim


Change
year = now.getYear();
to
year = now.getFullYear();


getYear and getFullYear
http://www.quirksmode.org/js/datecompat.html

http://www.developersdex.com/asp/mes...2978&r=3701766
Jul 23 '05 #3

P: n/a
JRS: In article <11*********************@z14g2000cwz.googlegroups. com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang.javascript,
kr****@princeton.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.


Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.

Indeed, you should read relevant FAQs before writing Web pages too; the
time you thus save includes your own.

Probably you are using method getYear which AIUI in various systems
can for current dates return 5, 105, or 2005.

Method getFullYear is available in current browsers (but be careful
if you are writing for the third world or backwoods colleges). And a
programmer can construct it from getYear and getTime . But if
that is the current date, then
(a) 2000 + getYear()%100 will do for quite a while
(b) telling the reader the current date is a waste of bandwidth.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #4

P: n/a
Dr John Stockton wrote:
JRS: In article <11*********************@z14g2000cwz.googlegroups. com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang.javascript,
kr****@princeton.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.

Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.


Really? Never seen it here. Perhaps it's sent via an email news feed?

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #5

P: n/a
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?


No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this machine.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #6

P: n/a
Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?

No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this machine.


Nope, sorry. Been reading this group since at least early 2003 and I've
never seen a FAQ posted. Again, perhaps it is automatically sent on the
mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to 11/13/2004
and there's no FAQ among them.

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #7

P: n/a
Ed Mullen <ed@edmullen.net> wrote in
news:ct*********@ripley.netscape.com:
Dr John Stockton wrote:

Before posting to a newsgroup, you should read its FAQ; the FAQ for
this group is posted thrice a week, in two parts.


Really? Never seen it here. Perhaps it's sent via an email news
feed?


This is heavily cross-posted. One of the other groups may indeed have a
weekly FAQ posted, but not here in netscape.public.mozilla.general

This is a classic example of why cross-posting is a bozo-no no.

Followups set to netscape.public.mozilla.general
--
}:-) Christopher Jahn
{:-( http://www.actorsplayhouse.org

"But we'll never survive!" "Nonsense. You're only saying that
because no one ever has." William Goldman, THE PRINCESS BRIDE
Jul 23 '05 #8

P: n/a
Ed Mullen wrote:
Michael Winter wrote: <snip>
No. It's posted just before 1200 GMT[1] every Monday, Wednesday
and Friday. It has been for as long as I've read this group.

<snip> Nope, sorry. Been reading this group since at least early 2003
and I've never seen a FAQ posted. Again, perhaps it is
automatically sent on the mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to
11/13/2004 and there's no FAQ among them.


The extensive list of cross-posted groups is not being observed. The FAQ
in question is the one belonging to comp.lang.javascript (and it is
posted to the group as described).

Richard.
Jul 23 '05 #9

P: n/a
Richard Cornford wrote:
Ed Mullen wrote:
Michael Winter wrote:


<snip>
No. It's posted just before 1200 GMT[1] every Monday, Wednesday
and Friday. It has been for as long as I've read this group.


<snip>
Nope, sorry. Been reading this group since at least early 2003
and I've never seen a FAQ posted. Again, perhaps it is
automatically sent on the mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to
11/13/2004 and there's no FAQ among them.

The extensive list of cross-posted groups is not being observed. The FAQ
in question is the one belonging to comp.lang.javascript (and it is
posted to the group as described).

Richard.


Ahhh! Excellent. Thank you.

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #10

P: n/a
"Ed Mullen" <ed@edmullen.net> wrote in message
news:ct*********@ripley.netscape.com...
Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?
No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group. .... [1] Possibly +0100 in the summer. I don't have those posts on this
machine.
Nope, sorry. Been reading this group since at least early 2003 and I've
never seen a FAQ posted. Again, perhaps it is automatically sent on the
mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using Mozilla
Suite Mail/News. I see messages here going back to 11/13/2004 and there's
no FAQ among them.


I think the FAQ referred to may be on comp.lang.javascript, one of the list
of groups to which this thread was cross-posted.
--
David Biddulph
Jul 23 '05 #11

P: n/a
On 30.01.2005 13:51, Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?


No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this machine.


Classic example of why x-posting is idiotic to say the least. Now you
got users confused over a FAQ that's posted to ONE group but not to the
other x-posted groups ... senseless waste of everybody's time and effort.

/dd
Jul 23 '05 #12

P: n/a
Ed Mullen wrote:
Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?


No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this
machine.


Nope, sorry. Been reading this group since at least early 2003 and I've
never seen a FAQ posted. Again, perhaps it is automatically sent on the
mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to 11/13/2004
and there's no FAQ among them.

Never seen it either....
Jul 23 '05 #13

P: n/a
David Biddulph wrote:
"Ed Mullen" <ed@edmullen.net> wrote in message
news:ct*********@ripley.netscape.com...
Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.net> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?
No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.
...
[1] Possibly +0100 in the summer. I don't have those posts on this
machine.


Nope, sorry. Been reading this group since at least early 2003 and I've
never seen a FAQ posted. Again, perhaps it is automatically sent on the
mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using Mozilla
Suite Mail/News. I see messages here going back to 11/13/2004 and there's
no FAQ among them.

I think the FAQ referred to may be on comp.lang.javascript, one of the list
of groups to which this thread was cross-posted.

I HATE cross-posted messages. BOUND to cause confusion!
Jul 23 '05 #14

P: n/a
JRS: In article <ct*********@ripley.netscape.com>, dated Sun, 30 Jan
2005 14:30:05, seen in news:comp.lang.javascript, Ed Mullen
<ed@edmullen.net> posted :
Dr John Stockton wrote:
JRS: In article <11*********************@z14g2000cwz.googlegroups. com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang.javascript,
kr****@princeton.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.

Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.


Really? Never seen it here. Perhaps it's sent via an email news feed?

But what do *you* mean by "here"?

If you had read the attribution which you quoted, you would have seen
exactly what I meant by "here". The signature of that article provided
a further clue.

Before responding to an article, read it all, including the significant
header lines and signature; and think about what you have read.
Remember that the responsibility for your outgoing newsgroups line is
yours and yours alone.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #15

P: n/a
On 29.01.2005 17:44, Dr John Stockton wrote:

--- Original Message ---
JRS: In article <11*********************@z14g2000cwz.googlegroups. com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang.javascript,
kr****@princeton.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.


Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.

Indeed, you should read relevant FAQs before writing Web pages too; the
time you thus save includes your own.

Probably you are using method getYear which AIUI in various systems
can for current dates return 5, 105, or 2005.

Method getFullYear is available in current browsers (but be careful
if you are writing for the third world or backwoods colleges). And a
programmer can construct it from getYear and getTime . But if
that is the current date, then
(a) 2000 + getYear()%100 will do for quite a while
(b) telling the reader the current date is a waste of bandwidth.


The correct answer was posted long before you posted your reply. YOU
need to read the group a little more often before you criticize others
dumbass.
Jul 23 '05 #16

P: n/a
On 31.01.2005 07:09, Dr John Stockton wrote:

--- Original Message ---
JRS: In article <ct*********@ripley.netscape.com>, dated Sun, 30 Jan
2005 14:30:05, seen in news:comp.lang.javascript, Ed Mullen
<ed@edmullen.net> posted :
Dr John Stockton wrote:
JRS: In article <11*********************@z14g2000cwz.googlegroups. com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang.javascript,
kr****@princeton.edu posted :

Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.
Really? Never seen it here. Perhaps it's sent via an email news feed?

But what do *you* mean by "here"?


If you know ANYthing about cross-posting then you'd maybe realize that
the poster is reading in a group that has never seen the FAQ or even
heard of it for that matter. You need to learn how to deal with
cross-posting and not be so rude. Maybe even be nice enough to give a
short explanation for the benefit of those that are reading in another
group.
If you had read the attribution which you quoted, you would have seen
exactly what I meant by "here". The signature of that article provided
a further clue.

Before responding to an article, read it all, including the significant
header lines and signature; and think about what you have read.
Remember that the responsibility for your outgoing newsgroups line is
yours and yours alone.


Take your own advice sometimes.
Jul 23 '05 #17

P: n/a
Bozo wrote:
<snip>
... . You need to learn how to deal with cross-posting and
not be so rude. Maybe even be nice enough to give a short
explanation for the benefit of those that are reading in
another group.

<snip>

Maybe that, or maybe just a suitable indicated URL for the online
version of the FAQ in question in a signature.

Richard.
Jul 23 '05 #18

P: n/a
John, I appreciate your suggestions re: FAQs. However, I, and many
others, just don't operate like that in my 100 hour work weeks. Some
have opinions about what's right and wrong in usenet (or is it really
Google)? I gave up with that a couple decades ago.

I ask a question in my rush, usually I get help, if not, oh well. If
you feel I (or others) waste your time, then you probably would save
lots of time by not answering. Nonetheless, I appreciate your helpful
response.

Jim

Jul 23 '05 #19

P: n/a
Sorry, Dr. John, but I have to respond again..

I just noticed you told me that providing the current date is a waste
of bandwidth.

People don't really take you as seriously as you wish they would, do
they?

Jim

Jul 23 '05 #20

P: n/a
Lee
kr****@princeton.edu said:

John, I appreciate your suggestions re: FAQs. However, I, and many
others, just don't operate like that in my 100 hour work weeks. Some
have opinions about what's right and wrong in usenet (or is it really
Google)? I gave up with that a couple decades ago.

I ask a question in my rush, usually I get help, if not, oh well. If
you feel I (or others) waste your time, then you probably would save
lots of time by not answering. Nonetheless, I appreciate your helpful
response.


You might get more done in that 100 hour work week, or might even
be able to cut it back a bit, if you learned to do research before
you ask. You usually get the answers much more quickly.

Jul 23 '05 #21

P: n/a
Lee
kr****@princeton.edu said:

Sorry, Dr. John, but I have to respond again..

I just noticed you told me that providing the current date is a waste
of bandwidth.


Can you explain why I would want your site to tell me the current date?
It's available in the toolbar of my display, or on the calendar on my
wall.

Jul 23 '05 #22

P: n/a
Hm, that's a tough one. I'll have to think about it, and get back to
you.

Thanks,
Jim

Jul 23 '05 #23

P: n/a
"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
kr****@princeton.edu said:

Sorry, Dr. John, but I have to respond again..

I just noticed you told me that providing the current date is a waste
of bandwidth.


Can you explain why I would want your site to tell me the current date?
It's available in the toolbar of my display, or on the calendar on my
wall.


A few reasons "why":

a) To get the current date on a Windows PC you have to hold your mouse over
the time in the system tray.

b) When the page is printed, the date and time appears on the page even if
Page Setup doesn't.

c) Not everyone has a calendar handy.

Many things waste bandwidth; showing the date is the least of them.
P.S. Jim, I'd put a comma after the day re "Tuesday February 1, 2005".
Jul 23 '05 #24

P: n/a
Lee
McKirahan said:

"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
kr****@princeton.edu said:
>
>Sorry, Dr. John, but I have to respond again..
>
>I just noticed you told me that providing the current date is a waste
>of bandwidth.


Can you explain why I would want your site to tell me the current date?
It's available in the toolbar of my display, or on the calendar on my
wall.


A few reasons "why":

a) To get the current date on a Windows PC you have to hold your mouse over
the time in the system tray.

b) When the page is printed, the date and time appears on the page even if
Page Setup doesn't.

c) Not everyone has a calendar handy.


The fact that I might not be wearing a watch is not a good reason
to walk up to me and tell me the time.

Your guess that I might not want to bother to lift my arm to look
at it is even less good.

Wouldn't the date that the content was created be more useful than
the date that you happened to print it?

Jul 23 '05 #25

P: n/a
"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
McKirahan said:

"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
kr****@princeton.edu said:
>
>Sorry, Dr. John, but I have to respond again..
>
>I just noticed you told me that providing the current date is a waste
>of bandwidth.

Can you explain why I would want your site to tell me the current date?
It's available in the toolbar of my display, or on the calendar on my
wall.

A few reasons "why":

a) To get the current date on a Windows PC you have to hold your mouse overthe time in the system tray.

b) When the page is printed, the date and time appears on the page even ifPage Setup doesn't.

c) Not everyone has a calendar handy.


The fact that I might not be wearing a watch is not a good reason
to walk up to me and tell me the time.


So anything thing that appears on a Web page is equivalent to walking up to
you and telling you; excellent logic.
Your guess that I might not want to bother to lift my arm to look
at it is even less good.
Since you might "not be wearing a watch", what will you be lifting your arm
to look at it?
Wouldn't the date that the content was created be more useful than
the date that you happened to print it?


Useful to whom?
All I suggested was that a "few reasons why" existed.

Whether or not you agree with any of them is immaterial.
Talk about wasting bandwidth ...


Jul 23 '05 #26

P: n/a
Lee
McKirahan said:

"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
McKirahan said:
>
>"Lee" <RE**************@cox.net> wrote in message
>news:ct*********@drn.newsguy.com...
>> kr****@princeton.edu said:
>> >
>> >Sorry, Dr. John, but I have to respond again..
>> >
>> >I just noticed you told me that providing the current date is a waste
>> >of bandwidth.
>>
>> Can you explain why I would want your site to tell me the current date?
>> It's available in the toolbar of my display, or on the calendar on my
>> wall.
>>
>
>A few reasons "why":
>
>a) To get the current date on a Windows PC you have to hold your mouseover >the time in the system tray.
>
>b) When the page is printed, the date and time appears on the page evenif >Page Setup doesn't.
>
>c) Not everyone has a calendar handy.
The fact that I might not be wearing a watch is not a good reason
to walk up to me and tell me the time.


So anything thing that appears on a Web page is equivalent to walking up to
you and telling you; excellent logic.


The analogy that you seemed to miss concerns providing
unsolicited, irrelevant information.

Your guess that I might not want to bother to lift my arm to look
at it is even less good.


Since you might "not be wearing a watch", what will you be lifting your arm
to look at it?


Reconsider the meaning of the words "might not".

Wouldn't the date that the content was created be more useful than
the date that you happened to print it?


Useful to whom?


Um, anybody?

All I suggested was that a "few reasons why" existed.

Whether or not you agree with any of them is immaterial.
Talk about wasting bandwidth ...


I had intended it as a discussion of design practice. It's only
the attitude that any opinions other than yours are "immaterial"
that may make it a waste of bandwidth.

Jul 23 '05 #27

P: n/a
Bozo wrote:
If you know ANYthing about cross-posting then you'd maybe realize that
the poster is reading in a group that has never seen the FAQ or even
heard of it for that matter. You need to learn how to deal with
cross-posting and not be so rude. Maybe even be nice enough to give a
short explanation for the benefit of those that are reading in another
group.

John's point was that the address to find the FAQ, the group to which
the FAQ applies, the group *from* which John was posting and the subject
at hand were *all* included in his reply.

I'm afraid it is up to the OP to read the damn replies and be
responsible for his own posting - not for John to try and second-guess
his actual intentions. John's reply was concise, clear, informative,
with full references and every possible detail that could have been
asked for.
Jul 23 '05 #28

P: n/a
McKirahan wrote:
"Lee" <RE**************@cox.net> wrote in message
news:ct*********@drn.newsguy.com...
kr****@princeton.edu said:
Sorry, Dr. John, but I have to respond again..

I just noticed you told me that providing the current date is a waste
of bandwidth.
Can you explain why I would want your site to tell me the current date?
It's available in the toolbar of my display, or on the calendar on my
wall.


A few reasons "why":

a) To get the current date on a Windows PC you have to hold your mouse over
the time in the system tray.

But at least it *is* the date. There is no guarantee that the website is
even in my date-zone, never mind my time-zone, so it might be quite
wrong for me.
b) When the page is printed, the date and time appears on the page even if
Page Setup doesn't.
It is up to me what gets printed on my pages. If I choose date (and
time) I get the date and time it is printed on. If I get it from the
website, I most likely do not - I get what time it is
*where_the_web_server_is*, not where I is :)
c) Not everyone has a calendar handy.

If they don't, it is easy enough to get one and more reliable than using
someone else's computer somewhere else in the world.
Jul 23 '05 #29

P: n/a
"Mark Preston" <us****@nosource.co.uk> wrote in message
news:ct*******************@news.demon.co.uk...

[snip]
A few reasons "why":

a) To get the current date on a Windows PC you have to hold your mouse over the time in the system tray.

But at least it *is* the date. There is no guarantee that the website is
even in my date-zone, never mind my time-zone, so it might be quite
wrong for me.

b) When the page is printed, the date and time appears on the page even if Page Setup doesn't.

It is up to me what gets printed on my pages. If I choose date (and
time) I get the date and time it is printed on. If I get it from the
website, I most likely do not - I get what time it is
*where_the_web_server_is*, not where I is :)
c) Not everyone has a calendar handy.

If they don't, it is easy enough to get one and more reliable than using
someone else's computer somewhere else in the world.


This is client-side JavaScript!

You see that date and time of your computer when viewing the page.
Jul 23 '05 #30

P: n/a
JRS: In article <ct*******************@news.demon.co.uk>, dated Tue, 1
Feb 2005 16:01:15, seen in news:comp.lang.javascript, Mark Preston
<us****@nosource.co.uk> posted :
a) To get the current date on a Windows PC you have to hold your mouse over
the time in the system tray.

But at least it *is* the date. There is no guarantee that the website is
even in my date-zone, never mind my time-zone, so it might be quite
wrong for me.

Javascript does not know where the website, by which I suppose you mean
the server, is.

The date and time that it will show will be the current date and time,
either GMT/UTC or local, as the client computer has it - provided that
the programmers have not made any silly errors such as displaying in FFF
outside FFF-land, using uncorrected getYear, etc.

However, we do know that neither the web-site programmer nor the browser
programmer is really to be trusted; for example, IE4 & IE6 (as
delivered) get the Week Number wrong for three days every 28 years, as
shown in <URL:http://www.merlyn.demon.co.uk/vb-dates.htm>.

The real folly lies in the presumption that the user wants to be told
the date that his computer is set to (except for pages that use that
information, naturally).

<FAQENTRY> Never do something unrequested on a Web page - fancy
background, showing date and/or time, etc., unless there is reason to
expect it to be beneficial to the typical reader. </FAQENTRY>

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
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.
Jul 23 '05 #31

P: n/a
Probably, but it would also let people see how lazy I am.
"Last updated, March 23, 1923...."
Jim

Jul 23 '05 #32

P: n/a
Dr John Stockton wrote:
JRS: In article <ct*******************@news.demon.co.uk>, dated Tue, 1
Feb 2005 16:01:15, seen in news:comp.lang.javascript, Mark Preston
<us****@nosource.co.uk> posted :
a) To get the current date on a Windows PC you have to hold your mouse over
the time in the system tray.

But at least it *is* the date. There is no guarantee that the website is
even in my date-zone, never mind my time-zone, so it might be quite
wrong for me.


Javascript does not know where the website, by which I suppose you mean
the server, is.

Does if its server-side Javascript. My bad - didn't read the OP.
Jul 23 '05 #33

P: n/a
Hi Richard. My name is Luciano from Aries Systems. I sent you a couple
of emails asking for permission to use your javascript scrolling
datagrid in our web application. I'm assuming I was filtered out as
spam. We we're very impressed with your work on the grid. We would be
sure to mention you everywhere your script is used. Could you please
send me an email with your response? Thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #34

P: n/a
Hi Richard. My name is Luciano from Aries Systems. I sent you a couple
of emails asking for permission to use your javascript scrolling
datagrid in our web application. I'm assuming I was filtered out as
spam. We we're very impressed with your work on the grid. We would be
sure to mention you everywhere your script is used. Could you please
send me an email with your response? Thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #35

This discussion thread is closed

Replies have been disabled for this discussion.