| Get your FREE home page! |
the day I last updated this page. No script. You'll see why. WILL YOUR PAGE [ THE CHECKLIST | HOW TO TEST + MY 30 PAGES ] One Saturday in August my dad went to the hardware store, which for my dad is a three-hour trip, and I set our family computer's clock ahead to January 1, 2000. Then I went around the Web and looked at home pages, to see what they'll look like on New Year's Day. A lot of them broke. Then I set the clock back, before he got home. (He knows now. He's mostly okay with it.) This is what I found, as a checklist. Go down it with your own page open in another window. First, what setting your clock can and can't test. Moving your clock only changes the date on YOUR computer. So it tests the parts of a page that run on your computer, which means JavaScript. Counters and guestbooks run on the service's computer, and that computer was still in 1999. I couldn't test those by moving my clock. But you can tell a lot just by looking at them (see number 3). [ ] 1. JAVASCRIPT DATES This is the big one. Lots of pages have a little script that writes today's date. Lots of those scripts build the year by sticking "19" in front of what the browser gives them. Like this:
Today, getYear() gives 99, and you get "Today is 9/25/1999." Looks fine. But on January 1:
That's because in Navigator 4.06 and later, getYear() gives you 100 for the year 2000, and in Internet Explorer it gives you 2000. Stick "19" in front of either one and you get garbage. The fix is on Lorenzo's JavaScript Zone, on his Clocks & Dates page. If the year comes back smaller than 1000, add 1900. That gives you the right year whether the browser said 100 or 2000:
That's my example fixed. Lorenzo's whole date script is on his page, with the day and month names, and he tested it in both browsers. There's also getFullYear(), which gives all four digits and works in Navigator 4.06 and later and Internet Explorer 4 and later. Lorenzo doesn't use it, because older Netscapes don't know it and a script that crashes is worse than no script. I agree. Also look for scripts that print getYear() all by itself. In Netscape those will say the year is 100. I saw "Copyright 100" on one page. [ ] 2. COUNTDOWNS Everybody has a "days until 2000" countdown right now. What does yours say on January 1? Two of the ones I tested said "0 days until the year 2000!" and one said "-1 days." Make yours say something else after midnight, or take it down on New Year's Day. Lorenzo's countdown already knows what to say after New Year's, so you can use his. [ ] 3. GUESTBOOKS AND COUNTERS Most free guestbooks and counters run on a script in Perl, on the service's computer. Perl has the same problem JavaScript does: the year it gives you is the year minus 1900, so next year it's 100. A Perl script that sticks "19" in front of that will stamp 19100 on every guestbook entry after midnight. You can't fix this one yourself, because it isn't on your page. What you can do is look. If your guestbook dates its entries with a two-digit year, like 9/25/99, somebody's script is building that year somehow. Write to the service and ask them, politely, whether they've tested it for 2000. If they don't answer by Thanksgiving, think about moving your guestbook somewhere that will. [ ] 4. DATES YOU TYPED YOURSELF "Last updated 1/3/00." Is that January 3 or March 1? Is it 1900? Nobody knows. Write the year out with all four digits. Better, write the whole date out: January 3, 2000. Start practicing on 1999 now. If you type "updated 9/25/99" on your page today, change it. [ ] 5. COPYRIGHT LINES Twenty-two of the thirty pages I tested had a copyright line typed in by hand that ends in 1999. They'll all need a 2000 in January. Put a note on your calendar for January 1. You'll be up anyway. [ ] 6. Y2K COMPLIANT BUTTONS
WARNING: Before you set your own clock ahead to try this, read HOW TO TEST SAFELY. Some programs do NOT like it, and one of mine never recovered. The big picture. This page is only about home pages. For banks, the power company and whether your family should buy a generator, read The Y2K Watch by Gordon Hale. He's a systems analyst who has worked on the Year 2000 problem for a living since 1997, and he's calmer about it than my dad. He says a PC from the last couple of years running Windows 98 is almost certainly fine, and the worst case is that the clock is wrong and you set it. (this is the plain Page Builder counter. it counts visitors, not years, so it should make it. I'll check on January 1 anyway.) Found a bug I missed? [email protected] |