[Seaside] WAMiniCalendar bug (and fix)
jfitzell at gmail.com
Tue Mar 30 23:31:02 UTC 2010
On Tue, Mar 30, 2010 at 3:41 PM, Frank Shearar
<frank.shearar at angband.za.org> wrote:
> Hi everyone,
> I played around a bit with WAMiniCalendar today, and found something funny.
> I went back to March 2008, and I can see an extra row. The first row of the
> table is completely blank -
> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> -
> and then the rest of the month is displayed normally.
> That's happening because March 2008 starts on a Sunday.
> WAMiniCalendar>>weeksDo: needs to look like this:
> weeksDo: aBlock
> | day nextMonth |
> day := Date newDay: 1 monthNumber: self monthIndex year: self year.
> (day dayOfWeek < 7) ifTrue: [day := day subtractDays: day dayOfWeek].
> nextMonth := (self monthIndex \\ 12) + 1.
> [ day monthIndex = nextMonth ] whileFalse: [
> aBlock value: day.
> day := day addDays: 7 ]
> (Summary: day := day subtractDays: day dayOfWeek gets a conditional.)
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside