I have a small script on a website that that changes the greeting
according to the time of day and displays the current day and date. This
works fine in Internet Explorer, but when viewed in Opera, 2005 displays
as 105.
Any help with this gratefully recieved.
TIA
MH
remove -bats- to reply 9 1679
On 29/09/2005 12:09, Mike Hyndman wrote: I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105.
This was covered two days ago. See:
Who's fault: different displays of date
Date: 2005/09/27 22:44
Author: Dung Ping
Message ID: 11**********************@g44g2000cwa.googlegroups. com
<URL:http://groups.google.co.uk/group/comp.lang.javascript/browse_thread/thread/eff514c740a32ae2/2b7ac24ffecf7308>
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Mike Hyndman wrote: I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Don't use getYear(), use getFullYear().
getFullYear() is not supported by very old browsers, you may need to
account for them or at least fail gracefully.
getYear is defined as the current year minus 1900. Why such a value was
thought more useful than the real year is a mystery, but eventually
reason prevailed (no doubt assisted by Y2K issues) and getFullYear was
introduced.
However, some browser developers decided to make getYear report as if it
were getFullYear anyway, making confusion worse rather than better.
TIA MH remove -bats- to reply
--
Rob
On Thu, 29 Sep 2005 12:09:59 GMT, Michael Winter
<m.******@blueyonder.co.uk> wrote: On 29/09/2005 12:09, Mike Hyndman wrote:
I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105.
This was covered two days ago. See:
Who's fault: different displays of date
Date: 2005/09/27 22:44 Author: Dung Ping Message ID: 11**********************@g44g2000cwa.googlegroups. com
<URL:http://groups.google.co.uk/group/comp.lang.javascript/browse_thread/thread/eff514c740a32ae2/2b7ac24ffecf7308>
Mike,
My apologies, I must have missed that. When I downloaded the messages
for the first time for this group I only got the last 24 hours.
Many thanks
Mike H
remove -bats- to reply
On Thu, 29 Sep 2005 22:10:52 +1000, RobG <rg***@iinet.net.au> wrote: Mike Hyndman wrote: I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Don't use getYear(), use getFullYear().
getFullYear() is not supported by very old browsers, you may need to account for them or at least fail gracefully.
getYear is defined as the current year minus 1900. Why such a value was thought more useful than the real year is a mystery, but eventually reason prevailed (no doubt assisted by Y2K issues) and getFullYear was introduced.
However, some browser developers decided to make getYear report as if it were getFullYear anyway, making confusion worse rather than better.
Rob,
Sorted!
Many thanks
Mike H
remove -bats- to reply
JRS: In article <qi********************************@4ax.com>, dated
Thu, 29 Sep 2005 12:09:00, seen in news:comp.lang.javascript, Mike
Hyndman <mi**@tmphynd-bats-man.demon.co.uk> posted : I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Read the newsgroup FAQ, un-maintained as it now is; see below.
--
© 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.
Dr John Stockton said the following on 9/29/2005 6:28 PM: JRS: In article <qi********************************@4ax.com>, dated Thu, 29 Sep 2005 12:09:00, seen in news:comp.lang.javascript, Mike Hyndman <mi**@tmphynd-bats-man.demon.co.uk> posted :
I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Read the newsgroup FAQ, un-maintained as it now is; see below.
The neswgroup FAQ, contrary to your belief, is maintained. If it were
not maintained it wouldn't be available on the web.
Or, do you mean "Not maintained and updated as you would like to see"?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
JRS: In article <T8********************@comcast.com>, dated Thu, 29 Sep
2005 21:08:43, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted : Dr John Stockton said the following on 9/29/2005 6:28 PM:
JRS: In article <qi********************************@4ax.com>, dated Thu, 29 Sep 2005 12:09:00, seen in news:comp.lang.javascript, Mike Hyndman <mi**@tmphynd-bats-man.demon.co.uk> posted :
I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Read the newsgroup FAQ, un-maintained as it now is; see below.
The neswgroup FAQ, contrary to your belief, is maintained. If it were not maintained it wouldn't be available on the web.
Or, do you mean "Not maintained and updated as you would like to see"?
Once upon a time, you made only intelligent remarks. Nostalgia rules.
--
© John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Dr John Stockton said the following on 9/30/2005 6:34 PM: JRS: In article <T8********************@comcast.com>, dated Thu, 29 Sep 2005 21:08:43, seen in news:comp.lang.javascript, Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 9/29/2005 6:28 PM:
JRS: In article <qi********************************@4ax.com>, dated Thu, 29 Sep 2005 12:09:00, seen in news:comp.lang.javascript, Mike Hyndman <mi**@tmphynd-bats-man.demon.co.uk> posted :
I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Read the newsgroup FAQ, un-maintained as it now is; see below.
The neswgroup FAQ, contrary to your belief, is maintained. If it were not maintained it wouldn't be available on the web.
Or, do you mean "Not maintained and updated as you would like to see"?
Once upon a time, you made only intelligent remarks. Nostalgia rules.
I won't ask how you consider that anything other than an intelligent
question unless you are paranoid. It was, in fact, an intellligent
question with a very good reason for being stated the way it was.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Dr John Stockton wrote: JRS: In article <T8********************@comcast.com>, dated Thu, 29 Sep 2005 21:08:43, seen in news:comp.lang.javascript, Randy Webb <Hi************@aol.com> posted :
Dr John Stockton said the following on 9/29/2005 6:28 PM:
JRS: In article <qi********************************@4ax.com>, dated Thu, 29 Sep 2005 12:09:00, seen in news:comp.lang.javascript, Mike Hyndman <mi**@tmphynd-bats-man.demon.co.uk> posted :
I have a small script on a website that that changes the greeting according to the time of day and displays the current day and date. This works fine in Internet Explorer, but when viewed in Opera, 2005 displays as 105. Any help with this gratefully recieved.
Read the newsgroup FAQ, un-maintained as it now is; see below.
The neswgroup FAQ, contrary to your belief, is maintained. If it were not maintained it wouldn't be available on the web.
Or, do you mean "Not maintained and updated as you would like to see"?
Once upon a time, you made only intelligent remarks. Nostalgia rules.
If he wasn't a ego-troll before, I think he's becoming one now, given
the insulting and non-helpful attitude I've seen here.... This discussion thread is closed Replies have been disabled for this discussion. Similar topics
4 posts
views
Thread by Jo |
last post: by
|
13 posts
views
Thread by Dr John Stockton |
last post: by
|
7 posts
views
Thread by cc900630 |
last post: by
|
1 post
views
Thread by FatBoyThin |
last post: by
|
9 posts
views
Thread by Ed Crowley |
last post: by
|
2 posts
views
Thread by Robin |
last post: by
|
8 posts
views
Thread by hugh webster |
last post: by
|
34 posts
views
Thread by -Lost |
last post: by
|
5 posts
views
Thread by Dr J R Stockton |
last post: by
| | | | | | | | | | |