From: Olivier S. <ob...@us...> - 2005-08-01 07:50:38
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23578/dev/JVCL3/run Modified Files: JvTFMonths.pas Log Message: Protecting against reading the month when the current value is a month that has more days than the value being set. Index: JvTFMonths.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTFMonths.pas,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** JvTFMonths.pas 17 Feb 2005 10:20:56 -0000 1.19 --- JvTFMonths.pas 1 Aug 2005 07:50:29 -0000 1.20 *************** *** 124,127 **** --- 124,130 ---- implementation + uses + DateUtils; + constructor TJvTFMonths.Create(AOwner: TComponent); begin *************** *** 508,512 **** --- 511,519 ---- DecodeDate(DisplayDate, Y, M, D); if Value <> M then + begin + if D > DaysInAMonth(Y, Value) then + D := DaysInAMonth(Y, Value); DisplayDate := EncodeDate(Y, Value, D); + end; end; |