Tuesday, January 07, 2003

Comments: 2003 = 103?
w.bloggar has been playing up - it allows me to generate text, but does not then post and publish it satisfactorily.

Today I have spent doing several things, but one activity was the correction of some problems with the calendar routines for the pitas site. The "today" highlighting did not work for Netscape, Mozilla and Opera - this turned out to be because the date handling routines in the different browsers do not return the same year for today - IE returns 2003, while the others return 103. It also seems that earlier versions (5.0 and perhaps earlier) also returned 103.

I had to modify the code to make it browser specific, and I think it now works for most browsers.

I also took the opportunity to "improve" the calendar appearance, which now has coloured headings.

One outstanding problem concerns the font size in the calendar. I changed the font size in the rest of the template using a font size = "-1" instruction, but I have not been able to change the size of, or the font size of the calendar. This is a mystery, and at present I have no idea why this should be so. I also took the opportunity to restructure the template, and I noticed that there is quite a big upsurge of interest in the site.

Monday, January 06, 2003

2003 = 103?
Amazing to discover that different browsers have different javascript routines, which actually behave differently. In Netscape and Mozilla, the getDate() function returns the current year minus 1900 which is 103, while in Internet Explorer the same function returns 2003, which at least seems more logical. The effect on the calendar routines was quite considerable, and as originally written they worked in IE, but not in the other browsers. Now the code has been modified to detect each browser, though some still don't work properly - maybe there's some other value which is also equal to 103 or 2003?

Sunday, January 05, 2003

calendars
I've spent almost all the day creating and testing calendar routines for use with the dave2002 site on pitas.com. Since pitas is quite a simple weblog site, I decided to use javascript, and embed the routines in the template.

It didn't take too long (about 2 hours) to get something which worked, but it then took another 2 hours to redesign the code so that it worked more correctly, and perhaps a further 2-3 hours of tweaking to overcome some problems. There are still outstanding problems - mostly relating to the size of the fonts in different browsers, and one more elephant trap - the code I tested using HTML Kit highlighted some text using a bluish background, but of course most of the site at dave2002 uses a very similar colour as a background, so it looks as though the highlighting is not working properly. Anyway, mostly it works, and it's probably better to have something working than nothing at all.

Now let's see if that generates any interest from other punters!