[925] in IS Home Pages

home help back first fref pref prev next nref lref last post

Correction necessary on IS web page

daemon@ATHENA.MIT.EDU (jmorzins@MIT.EDU)
Fri Jan 14 10:07:56 2000

Date: Fri, 14 Jan 2000 10:07:53 -0500 (EST)
Message-Id: <200001141507.KAA00824@salticus-peckhamae.mit.edu>
From: jmorzins@MIT.EDU
To: is-home@MIT.EDU (IS Webmasters)

Please provide as much information as you can. Thank you.  

** Incorrect information:
    The page I was looking at contains a hardcoded "/19"
    in a printed date.  This causes dates on MSIE to
    print as "192000" and dates on Netscape to print
    as "19100".

    Fun.

** Location (URL):
    http://web.mit.edu/mcc/www/announcement.html

** Correction:
    A better way to do dates would be to make lines 14-17 be
var year=mydate.getYear()
if (year<1000)
year=1900+year
var day=mydate.getDay()

    and lines 41-46 be
year = test.getYear()

if (year<1000)
year=1900+year

document.write(" ",month,"/",day,"/",year," ")

    
    I apologize if these line numbers are off by one or two;
    I'm on a Mac right now, and don't have easy access to
    the "diff" and "patch" programs.

    Yes, the "windowing" around year 1000 is klugy, but
    the screwed-up behavior of MSIE makes it hard to do
    anything else.  Netscape always returns year-1900
    when you get the JavaScript date, but MSIE will
    return 2-digit years during the 1900's, but 4-digit(!)
    years for ANY other century.

** Is there an original source for this information (i.e. author, owner, etc.)?

    http://www.millkern.com/jsdate.html contains half
     of this suggested fix.

** Do you have a special interest in this information (i.e. owner, frequent reader, etc.)?
    Nope.


home help back first fref pref prev next nref lref last post