[Seaside] [Bug][Fix] WADateSelector
Raymond Asselin
raymondasselin at sympatico.ca
Thu Jul 7 17:05:44 CEST 2005
Le 2005/07/07, Raymond Asselin <raymondasselin at sympatico.ca>
écrivait :
>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
>_______________________________________________
>Seaside mailing list
>Seaside at lists.squeakfoundation.org
>http://lists.squeakfoundation.org/listinfo/seaside
Or
privateIsValidDay: theDay monthNumber: theMonth year: theYear
| maxDay |
theMonth >= 0 & (theMonth <= 12) ifFalse: [^false].
maxDay := Month daysInMonth: theMonth forYear: theYear.
^theDay > 0 & (theDay <= maxDay)
More information about the Seaside
mailing list