IncWeek¶
Increase a TDateTime value with a number of weeks.
Declaration¶
Source position: dateutil.inc line 310
function IncWeek(const AValue: TDateTime; const ANumberOfWeeks: Integer)
: TDateTime;
function IncWeek(const AValue: TDateTime) : TDateTime;
Description¶
IncWeek adds ANumberOfWeeks weeks to AValue and returns the resulting date/time.ANumberOfWeeks can be positive or negative.
See also¶
| Name | Description |
|---|---|
| IncYear | Increase a TDateTime value with a number of years. |
| #rtl.sysutils.IncMonth | Increases the month in a TDateTime value with a given amount. |
| IncDay | Increase a TDateTime value with a number of days. |
| IncHour | Increase a TDateTime value with a number of hours. |
| IncMinute | Increase a TDateTime value with a number of minutes. |
| IncSecond | Increase a TDateTime value with a number of seconds. |
| IncMilliSecond | Increase a TDateTime value with a number of milliseconds. |
Example¶
Program Example73;
{ This program demonstrates the IncWeek function }
Uses SysUtils,DateUtils;
Begin
Writeln('One Week from today is ',DateToStr(IncWeek(Today,1)));
Writeln('One Week ago from today is ',DateToStr(IncWeek(Today,-1)));
End.