Doug Ewell scripsit: > To cite a non-Unicode example, in ECMAScript (n�e JavaScript) there is a > function Date.GetYear() that was intended to return the last two digits > of the year but actually returned the year minus 1900. Of course, > starting in 2000 the function returned a value which was useful to > practically nobody.
How, not useful? C programmers have been dealing with (year - 1900) since the 70s, and it is now 103. :-) > Did Sun or ECMA change the definition of > Date.GetYear()? No, they introduced a new function, Date.GetFullYear(), > which does what users really want. I wonder why they bothered, since it can be defined in a single line of ECMAscript. Now if GetYear() had indeed returned the last two digits, that would have been annoying, since it could be used only for presentation, and in order to get the actual year, one would have to impose an arbitrary heuristic to map the 2-digit value to a year number. -- Only do what only you can do. John Cowan <[EMAIL PROTECTED]> --Edsger W. Dijkstra, http://www.reutershealth.com deceased 6 August 2002 http://www.ccil.org/~cowan

