From: James Edward Gray II Date: 2004-08-27T22:31:00+09:00 Subject: Re: Code Critique Request On Aug 27, 2004, at 7:56 AM, Carlos wrote: > I didn't try your code, but I've seen that you don't use the builtin > Date > class, neither you have an array with the month's length. So I guess > your > program will think that an event scheduled for the 31st of the month > will > happen tomorrow, if today is the 30th April. (Sorry if I'm mistaken.) Thanks for the interest. Originally, I was actually trying to solve it with Date, but I was having a heck of a time trying to make that work. The Quiz specification allows the event files to leave out a year, or worse a month. When the year is missing, the event occurs every year on the given date. If the month is missing, it's every month. This made it hard to simply parse and compare dates, because you would have to try several values for these events. It's very possible I just couldn't see the easy answer here, but this approach defeated me. I do THINK my code handles dates correctly, but I've been wrong before. I solved the above problem by generating a list of days (with Time objects) we are looking at for the calendar and then checking if an event could occur on that day. That was easier to get my head around. Thanks again for the comments though and the sample code. I like your output code, so I'm off to see just how it works... James Edward Gray II