home *** CD-ROM | disk | FTP | other *** search
- PROGRAM CalTest2;
-
- USES DOS,CRT,CALUNIT2;
- VAR
- MyCalendar: DateSelect;
- TYear,TMonth,TDay,TDOW: Word;
- BEGIN
- ClrScr;
- GetDate(TYear,TMonth,TDay,TDOW);
- WITH MyCalendar DO
- BEGIN
- WriteLn(' Current Month''s Calendar');
- WriteLn;
- Init(TMonth, TYear, TDay);
- WHILE (TMonth <> 0) DO
- BEGIN
- WriteLn;
- WriteLn('Enter Month, Day and Year');
- WriteLn('(Separate with spaces)');
- WriteLn;
- WriteLn(' exm. 5 1 1990');
- WriteLn;
- Write(' or 0 0 0 to quit: ');
- ReadLn(TMonth, TDay, TYear);
- IF TMonth <> 0 THEN
- BEGIN
- ClrScr;
- SetYear(TYear);
- SetMonth(TMonth);
- SetDay(TDay);
- DrawCalendar
- END
- END
- END;
- ClrScr
- END.
-
-