From 64ce8d2c4cbda152a3f3ca1128aef4e6c04c0bb1 Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Mon, 3 Jun 2019 22:39:30 +0200 Subject: [PATCH] Started documentation for date class --- doc/Makefile.am | 4 +- doc/date.html | 80 -------------------------- doc/date.xml | 150 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/manual.xml | 2 + 4 files changed, 154 insertions(+), 82 deletions(-) delete mode 100644 doc/date.html create mode 100644 doc/date.xml diff --git a/doc/Makefile.am b/doc/Makefile.am index 6b293a3..e3e9399 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 index 09bd94f..0000000 --- a/doc/date.html +++ /dev/null @@ -1,80 +0,0 @@ - - -date - ANDROMEDA CLASS LIBRARY - - - -

NAME

-

date - Date class

-

SYNOPSIS

-
-

#include - -date d;

-
-

DESCRIPTION

-

The date 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.

-

Construction

-
date()
-

The default constructor sets all elements (day, month and year) to 0. -

-
date(unsigned day, unsigned month=0, short year=0)
-
date(unsigned day, string month, short year)
-
date(string s)
-

Assignment

-
operator=(date &d)
-
operator=(string &s)
-

Conversion

-
long()
-

Converts to the Julian date number. This is the number of days since the -base date of the Julian calendar.

-
string()
-

Converts a date to an ASCII format.

-

Relational operations

-
operator==(date d)
-
operator!=(date d)
-
operator<(date d)
-
operator<=(date d)
-
operator>(date d)
-
operator>=(date d)
-

Attributes

-
unsigned day()
-
unsigned month()
-
short year()
-

Operations

-
int Leap()
-

Returns TRUE if this year is a leapyear. If this year is not a leapyear, -leap() returns 0.

-
unsigned DaysInMonth()
-

Returns the number of days in this month, or zero if the month is not -between 1 and 12.

-
unsigned WeekDay()
-
string DayName()
-
string MonthName()
-

Arithmetic

-
date operator+(date &d1, date &d2)
-
date operator+=(date &d)
-
date operator+(long l, date &d)
-
date operator+(date &d, long l)
-
date operator+=(long l)
-

Add l days to the date.

-
long operator-(date &d1, date &d2)
-

Calculate the number of days from d1 to d2.

-
date operator-(date &d1, date &d2)
-
date operator-=(date &d)
-

Subtract a number of days, months and years from the left-hand date. -

-
date operator-=(long l)
-

Subtract l days.

-
date operator++()
-
date operator--()
-

Stream I/O

-

SEE ALSO

-

hour UTC

-

DIAGNOSTICS

- - diff --git a/doc/date.xml b/doc/date.xml new file mode 100644 index 0000000..40d038d --- /dev/null +++ b/doc/date.xml @@ -0,0 +1,150 @@ + + +date - Date class +
+#include <date.h>
+
+date d;
+
+ +The date 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. + + +
+Construction + + +The default constructor sets all elements (day, month and year) to 0. + + + + + + + + +
+ +
+Assignment + + + + + + +
+ +
+ +Conversion + + +Converts to the Julian date number. This is the number of days since the +base date of the Julian calendar. + + +Converts a date to an ASCII format. + + +
+ +
+Relational operations + + + + + + + + + + + + + + +
+ +
+Attributes + + + + + + + + +
+ +
+ +Operations + + +Returns TRUE if this year is a leapyear. If this year is not a leapyear, +leap() returns 0. + + +Returns the number of days in this month, or zero if the month is not +between 1 and 12. + + + + + + + + +
+ +
+ +Arithmetic + + + + + + + + + + +Add l days to the date. + + +Calculate the number of days from d1 to d2. + + + + +Subtract a number of days, months and years from the left-hand date. + + +Subtract l days. + + + + + + +
+ +
+Stream I/O +
+ +
+SEE ALSO + +hour UTC + +
+
diff --git a/doc/manual.xml b/doc/manual.xml index e0c4c30..a1020ab 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -7,5 +7,7 @@ + -- 2.20.1