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 {
17 // struct which holds a single date
18 typedef struct
19 {
20 Ordinal Day;
21 Ordinal Month;
22 Ordinal Year;
23 } TDate;
24
25
26 // initializes a TDate struct with the current date
27 void Today(TDate& TheDate);
28
29 // initializes a TDate struct with a specified date
30 // !!! does not verify for validity !!!
31 void InitDate(TDate& TheDate, Ordinal TheDay, Ordinal TheMonth, Ordinal TheYear);
32
33 // compares two dates
34 Boolean EqualValue(const TDate& Date1, const TDate& Date2);
35
36 // copy a date
37 Boolean Copy(TDate& Date1, const TDate& Date2);
38
39 // displays a TDate
40 void Show(const TDate& TheDate);
41 };
42
43 #endif
44