با سلام خدمت دوستان.
ببین دوست عزیز تابعی که برای من این کار را می کنه خروجیش از نوع string خوب خیلی راحت من هم در هنگام فراخوانی تابع اونو مساوی با یک متغیر از نوع string قرار می دهم و بر روی فرم نمایش می دهم.
با سلام خدمت دوستان.
ببین دوست عزیز تابعی که برای من این کار را می کنه خروجیش از نوع string خوب خیلی راحت من هم در هنگام فراخوانی تابع اونو مساوی با یک متغیر از نوع string قرار می دهم و بر روی فرم نمایش می دهم.
می شه لطف کنی و بگی از چه تابعی استفاده می کنی
با سلام خدمت دوستان.
ببخشید چون account سایتی که آپلود می کردم پاک شده همین جا می نویسمامید وارم که استفاده کنی.function changedate():string;
const
shamsi:array[0..11] of Integer=(0,31,62,93,124,155,186,216,246,276,306,33 6); {ÌÏæá ÔãÓí}
miladi:array[0..11] of integer=(0,31,59,90,120,151,181,212,243,273,304,33 4); {ÌÏæá ãíáÇÏí ÚÇÏí}
miladicab:array[0..11] of integer=(0,31,60,91,121,152,182,213,244,274,305,33 5); {ãíáÇÏí ÚÇÏí ˜ÈíÓå}
var
cabise:array[0..19] of integer; {ÓÇá åÇí ˜ÈíÓå}
ezafe,baghi,res,i,sals,salm,mahm,mahs,roozm,roozs, majrooz:integer;
boolcabisemi,boolcabisesh:boolean;
s,s1,s2:string;
begin
cabise[0]:=2000;
cabise[1]:=2004;
cabise[2]:=2008;
S:=DateToStr(date);
while Pos('/', S) > 0 do
S[Pos('/', S)] := '0';
salm:=(StrToInt64(s) div 1000000);
baghi:=strtoint64(s) mod 100000;
mahm:=baghi div 1000;
roozm:=(baghi mod 100);
ezafe:=0;
boolcabisemi:=false;
boolcabisesh:=false;
for i:=0 to 19 do
if salm=cabise[i] then
begin
boolcabisemi:=true;
break;
end;
if boolcabisemi then
begin
majrooz:=miladicab[mahm-1]+roozm;
res:=80-majrooz;
if res<=0 then
res:=-(res)
else res:=365-res;
for i:=11 downto 0 do
if res>=shamsi[i] then
begin
mahs:=i+1;
roozs:=res-shamsi[i];
break;
end;
end
else
begin
majrooz:=miladi[mahm-1]+roozm;
res:=80-majrooz;
if res<=0 then
res:=-(res)
else res:=365-res;
for i:=11 downto 0 do
if res>=shamsi[i] then
begin
mahs:=i+1;
roozs:=res-shamsi[i];
Break;
end;
end;
if 80-majrooz>=1 then
sals:=salm-622
else
sals:=salm-621;
i:=sals-1383;
if (i mod 4)=0 then
boolcabisesh:=true;
if (boolcabisemi) and (boolcabisesh) then
ezafe:=0
else
ezafe:=1;
if (boolcabisesh) then
ezafe:=ezafe+1;
if (boolcabisesh) and not(boolcabisemi) then
if roozs=29 then
begin
roozs:=-1;
mahs:=mahs+1;
end;
roozs:=roozs+ezafe;
if roozs<10 then
s1:='0'+IntToStr(roozs)
else
s1:=IntToStr(roozs);
if mahs<10 then
s2:='0'+IntToStr(mahs)
else
s2:=IntToStr(mahs);
s:=IntToStr(sals)+'/'+s2+'/'+s1;
changedate:=s;
end;
هم اکنون 1 کاربر در حال مشاهده این تاپیک میباشد. (0 کاربر عضو شده و 1 مهمان)