~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to docs/datutex/ex103.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Program Example102;
 
2
 
 
3
{ This program demonstrates the SameTime function }
 
4
 
 
5
Uses SysUtils,DateUtils;
 
6
 
 
7
Const
 
8
  Fmt = 'dddd dd mmmm yyyy hh:nn:ss.zzz';
 
9
 
 
10
Procedure Test(D1,D2 : TDateTime);
 
11
 
 
12
begin
 
13
  Write(FormatDateTime(Fmt,D1),' is the same time as ');
 
14
  Writeln(FormatDateTime(Fmt,D2),' : ',SameTime(D1,D2));
 
15
end;
 
16
 
 
17
Var
 
18
  D,N : TDateTime;
 
19
 
 
20
Begin
 
21
  D:=Today;
 
22
  N:=Now;
 
23
  Test(D,D);
 
24
  Test(N,N);
 
25
  Test(N+1,N);
 
26
  Test(N-1,N);
 
27
  Test(N+OneSecond,N);
 
28
  Test(N-OneSecond,N);
 
29
End.
 
 
b'\\ No newline at end of file'