浏览代码

Fix #85 and remove warnings.

JECL 3 年之前
父节点
当前提交
53ee540942
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      Quick.Commons.pas

+ 5 - 5
Quick.Commons.pas

@@ -2212,27 +2212,27 @@ end;
 
 
 function TDateTimeHelper.DecDay(const aValue : Cardinal = 1) : TDateTime;
 function TDateTimeHelper.DecDay(const aValue : Cardinal = 1) : TDateTime;
 begin
 begin
-  Result := System.DateUtils.IncDay(Self,aValue * - 1);
+  Result := System.DateUtils.IncDay(Self,-aValue);
 end;
 end;
 
 
 function TDateTimeHelper.IncMonth(const aValue : Cardinal = 1) : TDateTime;
 function TDateTimeHelper.IncMonth(const aValue : Cardinal = 1) : TDateTime;
 begin
 begin
-  Result := System.DateUtils.IncDay(Self,aValue);
+  Result := SysUtils.IncMonth(Self,aValue);
 end;
 end;
 
 
 function TDateTimeHelper.DecMonth(const aValue : Cardinal = 1) : TDateTime;
 function TDateTimeHelper.DecMonth(const aValue : Cardinal = 1) : TDateTime;
 begin
 begin
-  Result := System.DateUtils.IncDay(Self,aValue * - 1);
+  Result := SysUtils.IncMonth(Self,-aValue);
 end;
 end;
 
 
 function TDateTimeHelper.IncYear(const aValue : Cardinal = 1) : TDateTime;
 function TDateTimeHelper.IncYear(const aValue : Cardinal = 1) : TDateTime;
 begin
 begin
-  Result := System.DateUtils.IncDay(Self,aValue);
+  Result := System.DateUtils.IncYear(Self,aValue);
 end;
 end;
 
 
 function TDateTimeHelper.DecYear(const aValue : Cardinal = 1) : TDateTime;
 function TDateTimeHelper.DecYear(const aValue : Cardinal = 1) : TDateTime;
 begin
 begin
-  Result := System.DateUtils.IncDay(Self,aValue * - 1);
+  Result := System.DateUtils.IncYear(Self,-aValue);
 end;
 end;
 
 
 function TDateTimeHelper.IsEqualTo(const aDateTime : TDateTime) : Boolean;
 function TDateTimeHelper.IsEqualTo(const aDateTime : TDateTime) : Boolean;