Explorar o código

* fixed CompareDate function. Only dates are compared now, ignoring time of day.

git-svn-id: trunk@13949 -
ivost %!s(int64=16) %!d(string=hai) anos
pai
achega
d4d3227e77
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      rtl/objpas/dateutil.inc

+ 1 - 1
rtl/objpas/dateutil.inc

@@ -1857,7 +1857,7 @@ Function CompareDate(const A, B: TDateTime): TValueRelationship;
 begin
   If SameDate(A,B) then
     Result:=EQualsValue
-  else if A<B then
+  else if Trunc(A)<Trunc(B) then
     Result:=LessThanValue
   else
     Result:=GreaterThanValue;