From: <jfu...@us...> - 2008-09-24 22:49:22
|
Revision: 11919 http://jvcl.svn.sourceforge.net/jvcl/?rev=11919&view=rev Author: jfudickar Date: 2008-09-24 21:36:04 +0000 (Wed, 24 Sep 2008) Log Message: ----------- Mantis 0004481: bug in JvTFUtils.IncMonths (Mantis #0004481) Modified Paths: -------------- trunk/jvcl/run/JvTFGlance.pas trunk/jvcl/run/JvTFUtils.pas Modified: trunk/jvcl/run/JvTFGlance.pas =================================================================== --- trunk/jvcl/run/JvTFGlance.pas 2008-09-24 21:02:48 UTC (rev 11918) +++ trunk/jvcl/run/JvTFGlance.pas 2008-09-24 21:36:04 UTC (rev 11919) @@ -2869,7 +2869,7 @@ var ExtraDesc : string; begin - if FViewer.ShowSchedNamesInHint then + if Assigned(FViewer) and FViewer.ShowSchedNamesInHint then {$IFDEF USEJVCL} ExtraDesc := StringsToStr(SchedNames, ', ', False); {$ELSE} Modified: trunk/jvcl/run/JvTFUtils.pas =================================================================== --- trunk/jvcl/run/JvTFUtils.pas 2008-09-24 21:02:48 UTC (rev 11918) +++ trunk/jvcl/run/JvTFUtils.pas 2008-09-24 21:36:04 UTC (rev 11919) @@ -261,10 +261,12 @@ // N defaults to 1 var Y, M, D, EOMD: Word; + X : Cardinal; begin DecodeDate(ADate, Y, M, D); - Inc(Y, N div 12); - Inc(M, N mod 12); + X := ((Y * 12) + M - 1 + N); + Y := X div 12; + M := (X mod 12) + 1; // Be careful not to get invalid date in Feb. if M = 2 then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |