[Seaside] [Bug][Fix] WADateSelector

Raymond Asselin raymondasselin at sympatico.ca
Thu Jul 7 17:03:28 CEST 2005


The following give an error when the month is precisely 12 like in
'december' 

privateIsValidDay: theDay monthNumber: theMonth year: theYear
    | maxDay |
    theMonth >= 0 & (theMonth < 12) ifFalse: [^false].
    maxDay := Month daysInMonth: theMonth forYear: theYear.
    ^theDay > 0 & (theDay <= maxDay)

This is the fix I think

privateIsValidDay: theDay monthNumber: theMonth year: theYear
    | maxDay |
    theMonth >= 0 & (theMonth < 13) ifFalse: [^false].
    maxDay := Month daysInMonth: theMonth forYear: theYear.
    ^theDay > 0 & (theDay <= maxDay)

Raymond


More information about the Seaside mailing list