Started documentation for date class
authorArjen Baart <arjen@andromeda.nl>
Mon, 3 Jun 2019 20:39:30 +0000 (22:39 +0200)
committerArjen Baart <arjen@andromeda.nl>
Mon, 3 Jun 2019 20:39:30 +0000 (22:39 +0200)
doc/Makefile.am
doc/date.html [deleted file]
doc/date.xml [new file with mode: 0644]
doc/manual.xml

index 6b293a3..e3e9399 100644 (file)
@@ -7,7 +7,7 @@ SUFFIXES = .obj .eps .png
 .obj.eps:
        tgif -print -eps -color $<
 
-XMLS = manual.xml string.xml
+XMLS = manual.xml string.xml date.xml
 IMAGES=
 
 PICTURES=
@@ -20,7 +20,7 @@ ps-local: manual.ps
 
 txt: manual.txt
 
-all:  ps html txt
+all:  html txt ps
 
 manual.html : $(XMLS) $(IMAGES)
        xml2html manual.xml > manual.html
diff --git a/doc/date.html b/doc/date.html
deleted file mode 100644 (file)
index 09bd94f..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>date - ANDROMEDA CLASS LIBRARY</TITLE>
-<!--Created by Applixware HTML Authoring System, Release 4.3 on Fri Jun 19 13:37:32 1998-->
-</HEAD>
-<BODY BGCOLOR="#ffffff">
-<H2>NAME</H2>
-<P>date - Date class</P>
-<H2>SYNOPSIS</H2>
-<PRE>
-<P>#include <date.h >
-
-date d;</P>
-</PRE>
-<H2>DESCRIPTION</H2>
-<P>The <I>date</I> class encapsulates the concept of a calender date. It holds
-a day and a month, both between 0 and 255, and a year ranging from -32768 to
-+32767. Although full-range dates can be usefull in calulations, a real date
-should have a day between 1 and 31 inclusive, and a month between 1 and 12.
-All calculations with dates are based on the Julian calendar.</P>
-<H3>Construction</H3>
-<H5>date()</H5>
-<P>The default constructor sets all elements (day, month and year) to 0.
-</P>
-<H5>date(unsigned day, unsigned month=0, short year=0)</H5>
-<H5>date(unsigned day, string month, short year)</H5>
-<H5>date(string s)</H5>
-<H3>Assignment</H3>
-<H5>operator=(date &amp;d)</H5>
-<H5>operator=(string &amp;s)</H5>
-<H3>Conversion</H3>
-<H5>long()</H5>
-<P>Converts to the Julian date number. This is the number of days since the
-base date of the Julian calendar.</P>
-<H5>string()</H5>
-<P>Converts a date to an ASCII format.</P>
-<H3>Relational operations</H3>
-<H5>operator==(date d)</H5>
-<H5>operator!=(date d)</H5>
-<H5>operator&lt;(date d)</H5>
-<H5>operator&lt;=(date d)</H5>
-<H5>operator&gt;(date d)</H5>
-<H5>operator&gt;=(date d)</H5>
-<H3>Attributes</H3>
-<H5>unsigned day()</H5>
-<H5>unsigned month()</H5>
-<H5>short year()</H5>
-<H3>Operations</H3>
-<H5>int Leap()</H5>
-<P>Returns TRUE if this year is a leapyear. If this year is not a leapyear, 
-<TT>leap()</TT> returns 0.</P>
-<H5>unsigned DaysInMonth()</H5>
-<P>Returns the number of days in this month, or zero if the month is not
-between 1 and 12.</P>
-<H5>unsigned WeekDay()</H5>
-<H5>string DayName()</H5>
-<H5>string MonthName()</H5>
-<H3>Arithmetic</H3>
-<H5>date operator+(date &amp;d1, date &amp;d2)</H5>
-<H5>date operator+=(date &amp;d)</H5>
-<H5>date operator+(long l, date &amp;d)</H5>
-<H5>date operator+(date &amp;d, long l)</H5>
-<H5>date operator+=(long l)</H5>
-<P>Add l days to the date.</P>
-<H5>long operator-(date &amp;d1, date &amp;d2)</H5>
-<P>Calculate the number of days from d1 to d2.</P>
-<H5>date operator-(date &amp;d1, date &amp;d2)</H5>
-<H5>date operator-=(date &amp;d)</H5>
-<P>Subtract a number of days, months and years from the left-hand date.
-</P>
-<H5>date operator-=(long l)</H5>
-<P>Subtract l days.</P>
-<H5>date operator++()</H5>
-<H5>date operator--()</H5>
-<H3>Stream I/O</H3>
-<H2>SEE ALSO</H2>
-<P><A HREF="hour.html">hour</A><A HREF="UTC.html"> UTC</A></P>
-<H2>DIAGNOSTICS</H2>
-</BODY>
-</HTML>
diff --git a/doc/date.xml b/doc/date.xml
new file mode 100644 (file)
index 0000000..40d038d
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<chapter>
+<heading>date - Date class</heading>
+<pre>
+#include &lt;date.h&gt;
+
+date d;
+</pre>
+<para>
+The <emph>date</emph> class encapsulates the concept of a calender date. It holds
+a day and a month, both between 0 and 255, and a year ranging from -32768 to
++32767. Although full-range dates can be usefull in calulations, a real date
+should have a day between 1 and 31 inclusive, and a month between 1 and 12.
+All calculations with dates are based on the Julian calendar.
+</para>
+
+<section>
+<heading>Construction</heading>
+<description>
+<item tag="date()">
+The default constructor sets all elements (day, month and year) to 0.
+</item>
+<item tag="date(unsigned day, unsigned month=0, short year=0)">
+</item>
+<item tag=">date(unsigned day, string month, short year)">
+</item>
+<item tag="date(string s)">
+</item>
+</description>
+</section>
+
+<section>
+<heading>Assignment</heading>
+<description>
+<item tag="operator=(date &amp;d)">
+</item>
+<item tag=">operator=(string &amp;s)">
+</item>
+</description>
+</section>
+
+<section>
+
+<heading>Conversion</heading>
+<description>
+<item tag="long()">
+Converts to the Julian date number. This is the number of days since the
+base date of the Julian calendar.
+</item>
+<item tag="string()">
+Converts a date to an ASCII format.
+</item>
+</description>
+</section>
+
+<section>
+<heading>Relational operations</heading>
+<description>
+<item tag="operator==(date d)">
+</item>
+<item tag="operator!=(date d)">
+</item>
+<item tag="operator&lt;(date d)">
+</item>
+<item tag="operator&lt;=(date d)">
+</item>
+<item tag="operator&gt;(date d)">
+</item>
+<item tag="operator&gt;=(date d)">
+</item>
+</description>
+</section>
+
+<section>
+<heading>Attributes</heading>
+<description>
+<item tag="unsigned day()">
+</item>
+<item tag="unsigned month()">
+</item>
+<item tag="short year()">
+</item>
+</description>
+</section>
+
+<section>
+
+<heading>Operations</heading>
+<description>
+<item tag="int Leap()">
+Returns TRUE if this year is a leapyear. If this year is not a leapyear, 
+<code>leap()</code> returns 0.
+</item>
+<item tag="unsigned DaysInMonth()">
+Returns the number of days in this month, or zero if the month is not
+between 1 and 12.
+</item>
+<item tag="unsigned WeekDay()">
+</item>
+<item tag="string DayName()">
+</item>
+<item tag="string MonthName()">
+</item>
+</description>
+</section>
+
+<section>
+
+<heading>Arithmetic</heading>
+<description>
+<item tag="date operator+(date &amp;d1, date &amp;d2)">
+</item>
+<item tag="date operator+=(date &amp;d)">
+</item>
+<item tag="date operator+(long l, date &amp;d)">
+</item>
+<item tag="date operator+(date &amp;d, long l)">
+</item>
+<item tag="date operator+=(long l)">
+Add l days to the date.
+</item>
+<item tag="long operator-(date &amp;d1, date &amp;d2)">
+Calculate the number of days from d1 to d2.
+</item>
+<item tag="date operator-(date &amp;d1, date &amp;d2)">
+</item>
+<item tag="date operator-=(date &amp;d)">
+Subtract a number of days, months and years from the left-hand date.
+</item>
+<item tag="date operator-=(long l)">
+Subtract l days.
+</item>
+<item tag="date operator++()">
+</item>
+<item tag="date operator--()">
+</item>
+</description>
+</section>
+
+<section>
+<heading>Stream I/O</heading>
+</section>
+
+<section>
+<heading>SEE ALSO</heading>
+<para>
+<A HREF="hour.html">hour</A><A HREF="UTC.html"> UTC</A>
+</para>
+</section>
+</chapter>
index e0c4c30..a1020ab 100644 (file)
@@ -7,5 +7,7 @@
     <toc/>
     <xi:include href="string.xml"
          xmlns:xi="http://www.w3.org/2001/XInclude"/>
+    <xi:include href="date.xml"
+         xmlns:xi="http://www.w3.org/2001/XInclude"/>
   </book>
 </doc>