SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Double Zero -- Ignore unavailable to you. Want to Upgrade?


To: TEDennis who wrote (2112)1/30/1998 1:45:00 PM
From: Bill Ulrich  Respond to of 4295
 
It gets even more interesting, TED. Here's a few tidbits from Hayden Press' Web Authoring Desk Reference:

&#147Warning! When setting the DATE object, you *can* specify only the last two digits as in '72. Don'tsuccumb to the millenium bug! The safe bet is to specify all years in full, four digits.&#148

-MrB



To: TEDennis who wrote (2112)1/30/1998 2:08:00 PM
From: Bill Ulrich  Respond to of 4295
 
TED, as a suggestion for FBN-JavaScript2000, some type of FBN-TrippyFlashBack plug-in code should be included. You see, real JavaScript treats midnight, Jan. 1, 1970 as the beginning of time. Any date set is calculated by the number of milliseconds elapsed since then.

Anybody wanting to re-visit the 1960s or re-calculate the amortization schedule on those reaallly old loans to Tiny Tim and the Smothers Bros. will want this feature.

1/1/1970 -- Genesis.

-MrB



To: TEDennis who wrote (2112)1/30/1998 2:29:00 PM
From: Bill Ulrich  Respond to of 4295
 
getYear, BTW, works differently depending on your browser. Since each browser is really a different compiling mechanism which varies according to platform and version, you can get some wacky results depending on your user. Some parts of javascript break under Mac vs. PC. Other parts break under ver3 vs. ver4. Still more breaks if IE vs. Navigator. It makes making a living trying to please all the web users interesting.

In Navigator, getYear returns two digits if we haven't hit the millenium yet, otherwise you get four. You assume, of course, the dang user has his clock set right.

setYear is probably more prone to Y2K probs than getYear simply because the programmer needs to take the responsibility of passing 4 digits; otherwise, '19' will be assumed regardless of the user clock. getYear has half the equation solved already.

IE 3 is an unusual character. Nevermind the upper date limit of 2037&#151 the Apocolypse, getYear returns 'now minus 1900' or 98 as of this writing. 2001 would be 101 which stands to reason-my danged commute down Highway 101 every morning is really a space odyssey.

-MrB