UNIX Free Pascal


..


13.62. date.

ses crt,dos;

var y,h,d,dw,ch,m,s,ms:word;

BEGIN

getdate(y,h,d,dw);

case dw of

1:write('');

2:write('');

3:write('');

4:write('');

5:write('');

6:write('');

7:write('');

end;

write(' ');

case h of

1:write('');

2:write('');

3:write('');

4:write('');

5:write('');

6:write('');

7:write('');

8:write('');

9:write('');

10:write('');

11:write('');

12:write('');

end;

write(' ');

write(d,' ');

gettime(ch,m,s,ms);

write(ch,':',m,':',s,':',ms,' ',y);

readln;

 

END.

 

13.63. cal.

uses crt,dos;

procedure cl(year,mes,pol_1:word);

var arr:array [0..7,1..7] of string[2];

i,j,kdm,n:byte;

v:boolean;

kd,k:word;

s:string[2];

begin

v:=false;

for i:=0 to 7 do

for j:=1 to 7 do

arr[i,j]:=' ';

if ((year mod 4=0)and(year mod 100<>0))or((year mod 4=0)and(year mod 100=0)and(year mod 400=0))

then v:=true

else if (year mod 100=0)and(year mod 400<>0)then v:=false;

case mes of

1:begin writeln('');

kdm:=31;

kd:=0;

end;

2:begin writeln('');

kd:=31;

if v then kdm:=29 else kdm:=28;

end;

3:begin writeln('');

kdm:=31;

if v then kd:=60 else kd:=59;

end;

4:begin writeln('');

kdm:=30;

if v then kd:=91 else kd:=90;

end;

5:begin writeln('');

kdm:=31;

if v then kd:=121 else kd:=120;

end;

6:begin writeln('');

kdm:=30;

if v then kd:=152 else kd:=151;

end;

7:begin writeln('');

kdm:=31;

if v then kd:=182 else kd:=181;

end;

8:begin writeln('');

kdm:=31;

if v then kd:=213 else kd:=212;

end;




- -  - -  - -