Laurent Updates Calendar Code
Laurent deWalick has taken my calendar code from Sunday's post and created probably the first live version. Laurent's version is probably better than mine because it uses the new Domino 6 functions and corrects a few of my oversights. For example, my line:
endDate:=@Adjust(@Date( @Year(@Adjust(startDate; 0;1;0;0;0;0)); @Month(@Adjust(startDate; 0;1;0;0;0;0)); 1); 0; 0; -1; 0; 0; 0);
Is quite a bit shorter thanks to Laurent:
endDate :=@Adjust(startDate; 0;1;-1;0;0;0);
Hey, I never said I was perfect... I was in a rush!
Today I discovered that this doesn't work with IIS/Domino. Damn!
endDate :=@Adjust(startDate; 0;1;-1;0;0;0); was not working, so I had to modify it in:
endDate:=@Adjust(@Adjust(startDate; 0;1;0;0;0;0);0;0;-1;0;0;0);
Domino first subtracted the day, so it went to november 30th and then added a month to have only 30 days in december.
Thanks Laurent. I too had not tested it yet. Mental note: Check that what you blog is true before you press submit!!
No need to show me how to do it, but this calender lark has me thinking. As an interface component I would see it being handy to have a calender like structure but each 'calender block' being a year (instead of a month) and each entry being a week.
So you'd have 2002 with 52 entries, and so on. I assume this is possible?