Skip to content

Commit bc5109c

Browse files
committed
add getdate sample
1 parent 12baab9 commit bc5109c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Program Example2;
2+
uses Dos;
3+
4+
{ Program to demonstrate the GetDate function. }
5+
6+
const
7+
DayStr : array[0..6] of string[3] = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
8+
MonthStr : array[1..12] of string[3] = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
9+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
10+
var
11+
Year, Month, Day, WDay : word;
12+
begin
13+
GetDate(Year, Month, Day, WDay);
14+
WriteLn('Current date');
15+
WriteLn(DayStr[WDay], ', ', Day, ' ', MonthStr[Month], ' ', Year, '.');
16+
end.

0 commit comments

Comments
 (0)