- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
function DatePlusOneDay(Date: TDate): TDate;
var
Day, Month, Year: string;
begin
Day := Copy(DateToStr(Date), 1, 2);
Month := Copy(DateToStr(Date), 4, 2);
Year := Copy(DateToStr(Date), 7, 4);
if frac(StrToFloat(Year) / 4) <> 0 then
if (Month = '01') or (Month = '03') or (Month = '05') or (Month = '07') or (Month = '08') or (Month = '10') or (Month = '12') then
if Day <> '31' then
if StrToInt(Day) < 9 then Day := '0' + IntToStr(StrToInt(Day) + 1)
else Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then
Month := '0' + IntToStr(StrToInt(Month) + 1)
else
if Month = '12' then
begin
Month := '01';
Year := IntToStr(StrToInt(Year) + 1);
end
else Month := IntToStr(StrToInt(Month) + 1);
end
else
if (Month = '04') or (Month = '06') or
(Month = '09') or (Month = '11') then
if Day <> '30' then
if StrToInt(Day) < 9 then Day := '0' + IntToStr(StrToInt(Day) + 1)
else Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then Month := '0' + IntToStr(StrToInt(Month) + 1)
else Month := IntToStr(StrToInt(Month) + 1);
end
else
if Day <> '28' then
if StrToInt(Day) < 9 then Day := '0' + IntToStr(StrToInt(Day) + 1)
else Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then Month := '0' + IntToStr(StrToInt(Month) + 1)
else Month := IntToStr(StrToInt(Month) + 1);
end
else
if (Month = '01') or (Month = '03') or (Month = '05') or (Month = '07') or (Month = '08') or (Month = '10') or (Month = '12') then
if Day <> '31' then
if StrToInt(Day) < 9 then Day := '0' + IntToStr(StrToInt(Day) + 1)
else Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then
Month := '0' + IntToStr(StrToInt(Month) + 1)
else
if Month = '12' then
begin
Month := '01';
Year := IntToStr(StrToInt(Year) + 1);
end
else
Month := IntToStr(StrToInt(Month) + 1);
end
else
if (Month = '04') or (Month = '06') or
(Month = '09') or (Month = '11') then
if Day <> '30' then
if StrToInt(Day) < 9 then
Day := '0' + IntToStr(StrToInt(Day) + 1)
else
Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then
Month := '0' + IntToStr(StrToInt(Month) + 1)
else
Month := IntToStr(StrToInt(Month) + 1);
end
else
if Day <> '28' then
if StrToInt(Day) < 9 then
Day := '0' + IntToStr(StrToInt(Day) + 1)
else
Day := IntToStr(StrToInt(Day) + 1)
else
begin
Day := '01';
if StrToInt(Month) < 9 then
Month := '0' + IntToStr(StrToInt(Month) + 1)
else
Month := IntToStr(StrToInt(Month) + 1);
end;
DatePlusOneDay := StrToDate(Day + '.' + Month + '.' + Year);
end;
guest 01.09.2009 21:26 # +3
guest 01.09.2009 21:29 # +3
Говногость 02.09.2009 13:51 # +3
OlgaWolga 02.09.2009 17:30 # 0
guest 02.09.2009 21:25 # +1
guest 06.09.2009 10:13 # 0
labutinpa 07.09.2009 00:56 # +1
Спасибо.
guest 08.12.2009 01:20 # +1
guest 27.02.2015 21:33 # 0