473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Y2K? Never heard of it...

The following is from RISKS-LIST: Risks-Forum Digest Sunday 26 December
2004 Volume 23 : Issue 63 archived at <http://www.risks.org>
Date: Thu, 23 Dec 2004 11:27:50 +0100
From: de*@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
Subject: Y2K? Never heard of it...

According to www.lexpress.fr (the website of a leading French news
magazine), today's date is Jeudi 23 décembre 104. The date is generated by
the following snippet of ECMAScript:

var tj= new
Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi ","Vendredi","Samedi");
var tm= new
Array("janvier","f&eacute;vrier","mars","avril","m ai","juin","juillet","ao&u
circ;t","septembre","octobre","novembre","d&eacute ;cembre");
d= new Date() ;
document.write( tj[d.getDay()] + " " + d.getDate() + " " +
tm[d.getMonth()] + " " + d.getYear()) ;

One wonders how long this has been so, and how much longer it will take
before they realize that they need to add 1900 to the year (and start
reading manuals).

Dag-Erling Smørgrav - de*@des.no
Jul 23 '05 #1
9 1300
McKirahan wrote:
The following is from RISKS-LIST: Risks-Forum Digest Sunday 26
December 2004 Volume 23 : Issue 63 archived at <http://www.risks.org>
Date: Thu, 23 Dec 2004 11:27:50 +0100
From: de*@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
Subject: Y2K? Never heard of it...

According to www.lexpress.fr (the website of a leading French news
magazine), today's date is Jeudi 23 décembre 104.

Now it's Lundi 27 décembre 2004.
Jul 23 '05 #2
Lee
Jan K. said:

McKirahan wrote:
The following is from RISKS-LIST: Risks-Forum Digest Sunday 26
December 2004 Volume 23 : Issue 63 archived at <http://www.risks.org>
Date: Thu, 23 Dec 2004 11:27:50 +0100
From: de*@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
Subject: Y2K? Never heard of it...

According to www.lexpress.fr (the website of a leading French news
magazine), today's date is Jeudi 23 décembre 104.

Now it's Lundi 27 décembre 2004.


IE shows the year as 2004, but browsers that implement getYear() correctly still
show it as 104.

Jul 23 '05 #3
JRS: In article <jnTzd.813955$8_6.313976@attbi_s04>, dated Mon, 27 Dec
2004 12:38:39, seen in news:comp.lang.javascript, McKirahan
<Ne**@McKirahan.com> posted :
According to www.lexpress.fr (the website of a leading French news
magazine), today's date is Jeudi 23 décembre 104. The date is generated by
the following snippet of ECMAScript: ... One wonders how long this has been so, and how much longer it will take
before they realize that they need to add 1900 to the year (and start
reading manuals).


I was plausibly informed, in effect, that getYear() can also currently
return 4 in at least one system. In mine, it returns 2004.

If the magazine wishes to express the date of issue, they should write
it in the HTML, in French. It's not a magazine's job to do what almost
any digital watch will do and what any likely computer can easily show.

The simple solution is to use, currently, 2000+getYear()%100 and to
update that a couple of times per century. Another is to calculate the
Full Year from the value of the Date Object; a two-line function can do
it. Or to assume that getFullYear will exist.

--
© 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
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:jnTzd.813955$8_6.313976@attbi_s04...
The following is from RISKS-LIST: Risks-Forum Digest Sunday 26 December
2004 Volume 23 : Issue 63 archived at <http://www.risks.org>


[snip]

Here are follow ups from RISKS-LIST: Risks-Forum Digest Tuesday 28 December
2004 Volume 23 : Issue 64:

Date: Sun, 26 Dec 2004 18:06:08 -0500
From: Scott Nicol <sn****@apk.net>
Subject: Re: Y2K? Never heard of it... (DES, RISKS-23.63)

This is one of those little problems that never should have been a problem.
It was a bad design, but the subsequent fixes created the problem. It
appears that lexpress.fr tests their site using Internet Explorer, since the
year will display correctly with this browser.

date.getYear() is supposed to return "year - 1900", so if you want to
display
"1999", you should add 1900 to date.getYear() before displaying it.
However, many lazy programmers displayed the date using the string "19" and
tacked on the result of date.getYear(). On January 1 2000, many web sites
showed the year as "19100".

Recognizing the problem, Netscape added date.getFullYear() in javascript 1.1
(but their documentation says it was added in 1.3), which returns the full
year. However, nobody wanted to use it because not every browser in use
supported it (even now, but especially in 2000).

Microsoft also recognized the problem, and "fixed" date.getYear() by making
Internet Explorer return 99 in 1999, but 2000 in 2000, breaking
compatibility
with almost every other browser. It would be easy to blame Microsoft for
this, except that Netscape itself made this same "fix" in some (but not all)
versions of navigator 3.

So for the first week of 2000, various web sites displayed 2000, 19100,
3900, 20100, 192000, 202000, or nothing, depending on what browser you were
using and how the code was written (and rewritten, again and again, as
different browser users complained).

The correct fix is to call date.getYear() and add 1900 to it if the result
is less than 1999. You won't find that in any reference manual, however.

------------------------------

Date: Sun, 26 Dec 2004 21:49:11 GMT
From: Ray Blaak <rA******@STRIPCAPStelus.net>
Subject: Re: Y2K? Never heard of it... (DES, RISKS-23.63)

And how much longer will it take before broken libraries finally stop having
getYear() return such unintuitive results?

It is not a precision problem.

The only "zero" year should be 0 BC/AD, and nothing else.

[Quite correct, even though there WAS NO ZERO YEAR. Whoever decided
on the BC to AD shift was certainly not a mathematician. PGN]
Jul 23 '05 #5
McKirahan wrote:
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:jnTzd.813955$8_6.313976@attbi_s04...

<--snip-->

The only "zero" year should be 0 BC/AD, and nothing else.

[Quite correct, even though there WAS NO ZERO YEAR. Whoever decided
on the BC to AD shift was certainly not a mathematician. PGN]


Don't let the Astronomers know that there was no Zero Year.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:whjAd.274877$V41.144653@attbi_s52...

[snip]
The only "zero" year should be 0 BC/AD, and nothing else.

[Quite correct, even though there WAS NO ZERO YEAR. Whoever decided
on the BC to AD shift was certainly not a mathematician. PGN]


aka "BCE" and "CE" resp.
"BC" and "AD" are christian oriented acronyms, and there's a (slow) shift
towards less biased naming.
(Christianity may be the largest religion in the world, but there's twice as
many non-christians than there are christians)
Jul 23 '05 #7
JRS: In article <El********************@phobos.telenet-ops.be>, dated
Wed, 29 Dec 2004 05:34:28, seen in news:comp.lang.javascript, steven
<st***********@pandora.be> posted :
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:whjAd.274877$V41.144653@attbi_s52...

[snip]
The only "zero" year should be 0 BC/AD, and nothing else.

[Quite correct, even though there WAS NO ZERO YEAR. Whoever decided
on the BC to AD shift was certainly not a mathematician. PGN]


aka "BCE" and "CE" resp.
"BC" and "AD" are christian oriented acronyms, and there's a (slow) shift
towards less biased naming.
(Christianity may be the largest religion in the world, but there's twice as
many non-christians than there are christians)

The terms BC & AD are used in ISO 8601:2000, and BCE & CE are not.
ECMA-262 does not use any of those, preferring formal ambiguity.
Implementations of javascript output, at least, A.D. & B.C., and accept
them and AD & BC; I've not heard of any that recognise CE and BCE in any
form.

One should not pander to anti-religious prejudices that attempt to deny
or conceal the true history of the world's main Calendar, and in
practice can only lead to confusion.

--
© 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 #8
Dr John Stockton wrote:
<snip>

One should not pander to anti-religious prejudices that attempt to deny
or conceal the true history of the world's main Calendar, and in
practice can only lead to confusion.


Don't you mean "anti-Christian prejudices". As a segment of the
population who practice a religion in some form, Christians are a minority.

NM
Jul 23 '05 #9
> One should not pander to anti-religious prejudices that attempt to deny
or conceal the true history of the world's main Calendar, and in
practice can only lead to confusion.


Right on. The citizens of the world must never forget that the month of
July was named for the Great Roman General, Emperor, and God Julius Caesar.

All Hail Mighty Caesar!
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: google_groups_web | last post by:
Good News! Do you know how simple it is to go to Heaven after this life has ended? Some people believe that belonging to a local church, temple, mosque or synagogue will get them to Heaven.
1
by: Simon Harvey | last post by:
Hi chaps, Does anyone know if the beast is going to release Visual Tools for office to work with Visual Studio 2002 and not just 2003, or are they quite happy to shaft those that supported them...
1
by: Sergey | last post by:
Hi Just curious if anyone ever heard of NetQuarry. They sell a "enterprise application platform" for .NET. My company is considering buying it and I wanted to know if anybody had any experience...
16
by: Jeff Flinn | last post by:
At the risk of raising the OT ire of some here, I'd like to know what might be done to raise the awareness of the boost libraries. I've found boost and it's libraries invaluable in my work for ~5...
0
by: Tony | last post by:
I thought I heard that v2 would allow a WebService to return a DataTable. I've tried this but it doesn't seem to work, the WebService compiles but I can't hook a client up to the method, so I have...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
3
by: DR | last post by:
I heard there is some trick to referencing statics in C# CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a little...
3
by: DR | last post by:
I heard there is some trick to referencing statics in VB.NET CLR stored procedure without having to mark the assembly as unsafe. Does anyone know this? This is usefull as the case of needing a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.