+ Initial implementation

This commit is contained in:
michael 1999-04-18 19:04:06 +00:00
parent e7994c7195
commit fe22fc386a
3 changed files with 65 additions and 0 deletions

33
docs/sysutex/ex4.pp Normal file
View File

@ -0,0 +1,33 @@
Program Example4;
{ This program demonstrates the DateTimeToString function }
Uses sysutils;
Procedure today (Fmt : string);
Var S : AnsiString;
begin
DateTimeToString (S,Fmt,Date);
Writeln (S);
end;
Procedure Now (Fmt : string);
Var S : AnsiString;
begin
DateTimeToString (S,Fmt,Time);
Writeln (S);
end;
Begin
Today ('"Today is "dddd dd mmmm y');
Today ('"Today is "d mmm yy');
Today ('"Today is "d/mmm/yy');
Now ('''The time is ''am/pmh:n:s');
Now ('''The time is ''hh:nn:ssam/pm');
Now ('''The time is ''tt');
End.

16
docs/sysutex/ex5.pp Normal file
View File

@ -0,0 +1,16 @@
Program Example5;
{ This program demonstrates the DateTimeToSystemTime function }
Uses sysutils;
Var ST : TSystemTime;
Begin
DateTimeToSystemTime(Now,ST);
With St do
begin
Writeln ('Today is ',year,'/',month,'/',Day);
Writeln ('The time is ',Hour,':',minute,':',Second,'.',MilliSecond);
end;
End.

16
docs/sysutex/ex6.pp Normal file
View File

@ -0,0 +1,16 @@
Program Example6;
{ This program demonstrates the DateTimeToTimeStamp function }
Uses sysutils;
Var TS : TTimeStamp;
Begin
TS:=DateTimeToTimeStamp (Now);
With TS do
begin
Writeln ('Now is ',time,' millisecond past midnight');
Writeln ('Today is ' ,Date,' days past 1/1/0001');
end;
End.