Sunday, September 19, 2004

Lazy Nogoodniks may now download That Damned Calendar

The code has been uploaded to the CodeBin as "Open WebCalendar". It's an .ns5 to make things easier all-round; ND6 users can make the few changes required to make it an all-6 solution if they want. In keeping with the spirit of, please repost any improvements you make to the code. Since this is not a fully-realised application, it has gone into the CodeBin instead of being thrown out as a Project. I will periodically review the entry and make any fixes/improvements as may be necessary.


Anonymous said...

Thank you very much, Stan! I appreciate your explanations in your article - it really helped me understand your thought process. Before you posted the database, I followed your article and re-created the calendar.

I ran into several of the "bugs" that you outlined in Friday's posting and was able to fix those myself to get the calendar to work.

Thanks again!

Anonymous said...


A couplea questions for you:

-- On certain months (e.g. 2004-02, 2004-05, 2004-10, 2005-01), I am getting the following error:

@Repeat yielding string too large (1024 characters maximum)

Is there anything that can be done to fix this?

-- Should events that span multiple days appear on each day in the calendar? Looking at the document properties on one of my documents that spans a few days, the IncludedDates field only contains the StartDate.

-- Small bug: On the "MultiColSimpleMonthly" view, no documents show on the calendar - a "*/ " needs to be prepended to the 2nd column formula to correct this

Thanks again for the database and for your help with these questions.


Anonymous said...

FYI... I fixed the bug regarding the multiple days not working: on the Calendar Entry form, in the formula for the IncludedDates field, all that needs to be changed is the ">" (greater than) to a "<" (less than).


Stan Rogers said...

I've had this running on ND6 for a while. The @Repeat problem is R5-specific (so THAT's why I had done it that way in the first place). You need to replace the single spacer cell before and after the Day_XX fields with two (name the StartSpacer_1, StartSpacer_2, EndSpacer_1 and EndSpacer_2). The formula is the same as it is now, except for the last line. For StartSpacer_1, use:

@If(@Weekday(StartDate) = 1; ""; "<tr>" + @If(@Weekday(StartDate)>3; @Repeat(spacer; 3); @Repeat(spacer; @Weekday(StartDate) - 1)))

For StartSpacer_2:

@If(@Weekday(StartDate)<4; ""; @Repeat(spacer; @Weekday(StartDate) - 4))

For EndSpacer_1, the replace the last two lines with:


For EndSpacer_2, replace the last two lines with:

@If(@Weekday(enddate) = 7; ""; @Weekday(enddate)>3;"</tr>";@Repeat(spacer;4-@Weekday(enddate)) + "</tr>")

As for the multi-day thing: "D'oh!" I can't even think of where I might find the resources to start researching where to start thinking about how THAT got in there. I can't remember typing in that field at all, just copying a field formula I've been using without problems for years and years. WTF?????

Stan Rogers said...

Fixes have been posted to The ZIP file now contains bot an NSF (ND6) and an NS5 (R5) version of the database.

Anonymous said...

Stan... you are THE MAN!! Thank you very much for the quick fix. I'm looking forward to reading your future articles!

Thanks again,

Anonymous said...

Nice series of articles on the calendar. I've never even though of things that way; I instead just used a script to grab hold of the domino generated calendar and assign classes to it and such before its displayed to the user thus improving the ugliness. Anyway, nice article and I like the out of the box thinking


Stan Rogers said...

I've done that too, Alan. The "business problem" being solved in this case was the categorization, particularly in R5; the appearance is just a pleasant side-effect. Thanks for the compliment, BTW.