1 ///////////////////////////////////////////////////////////
2 // Softwarebauelemente I, Aufgabe M6.2.
3 //
4 // author: Stephan Brumme
5 // last changes: December 29, 2000
6
7 #ifndef __MDATE_H__
8 #define __MDATE_H__
9
10 // we need the CEDL-types Ordinal, ...
11 #include "PrimitiveTypes.h"
12
13
14 // define namespace MDate
15 namespace MDate
{
16 // struct which holds a single date
17 typedef struct
{
18 Ordinal Day;
19 Ordinal Month;
20 Ordinal Year;
21 } TDate;
22
23
24 // initializes a TDate struct with the current date
25 void Today(TDate& TheDate);
26
27 // initializes a TDate struct with a specified date
28 // !!! does not verify for validity !!!
29 void InitDate(TDate& TheDate, Ordinal TheDay, Ordinal TheMonth, Ordinal TheYear);
30
31 // compares two dates
32 Boolean EqualValue(const TDate& Date1, const TDate& Date2);
33
34 // copy a date
35 Boolean Copy(TDate& Date1, const TDate& Date2);
36
37 // displays a TDate
38 void Show(const TDate& TheDate);
39 };
40
41 #endif
42