3 <TITLE>date - ANDROMEDA CLASS LIBRARY</TITLE>
4 <!--Created by Applixware HTML Authoring System, Release 4.3 on Fri Jun 19 13:37:32 1998-->
6 <BODY BGCOLOR="#ffffff">
8 <P>date - Date class</P>
16 <P>The <I>date</I> class encapsulates the concept of a calender date. It holds
17 a day and a month, both between 0 and 255, and a year ranging from -32768 to
18 +32767. Although full-range dates can be usefull in calulations, a real date
19 should have a day between 1 and 31 inclusive, and a month between 1 and 12.
20 All calculations with dates are based on the Julian calendar.</P>
23 <P>The default constructor sets all elements (day, month and year) to 0.
25 <H5>date(unsigned day, unsigned month=0, short year=0)</H5>
26 <H5>date(unsigned day, string month, short year)</H5>
27 <H5>date(string s)</H5>
29 <H5>operator=(date &d)</H5>
30 <H5>operator=(string &s)</H5>
33 <P>Converts to the Julian date number. This is the number of days since the
34 base date of the Julian calendar.</P>
36 <P>Converts a date to an ASCII format.</P>
37 <H3>Relational operations</H3>
38 <H5>operator==(date d)</H5>
39 <H5>operator!=(date d)</H5>
40 <H5>operator<(date d)</H5>
41 <H5>operator<=(date d)</H5>
42 <H5>operator>(date d)</H5>
43 <H5>operator>=(date d)</H5>
45 <H5>unsigned day()</H5>
46 <H5>unsigned month()</H5>
50 <P>Returns TRUE if this year is a leapyear. If this year is not a leapyear,
51 <TT>leap()</TT> returns 0.</P>
52 <H5>unsigned DaysInMonth()</H5>
53 <P>Returns the number of days in this month, or zero if the month is not
55 <H5>unsigned WeekDay()</H5>
56 <H5>string DayName()</H5>
57 <H5>string MonthName()</H5>
59 <H5>date operator+(date &d1, date &d2)</H5>
60 <H5>date operator+=(date &d)</H5>
61 <H5>date operator+(long l, date &d)</H5>
62 <H5>date operator+(date &d, long l)</H5>
63 <H5>date operator+=(long l)</H5>
64 <P>Add l days to the date.</P>
65 <H5>long operator-(date &d1, date &d2)</H5>
66 <P>Calculate the number of days from d1 to d2.</P>
67 <H5>date operator-(date &d1, date &d2)</H5>
68 <H5>date operator-=(date &d)</H5>
69 <P>Subtract a number of days, months and years from the left-hand date.
71 <H5>date operator-=(long l)</H5>
72 <P>Subtract l days.</P>
73 <H5>date operator++()</H5>
74 <H5>date operator--()</H5>
77 <P><A HREF="hour.html">hour</A><A HREF="UTC.html"> UTC</A></P>