  A date class for Splus version 5.  

  The main reason to download this directory is as an example.
This class is just complex enough to be interesting, but simple enough
to be pedagogically useful.  The technical report should be a useful
learning tool, and is included here as the "date.ps" file.  The report
appears in the proceedings of the 1998 Splus User Conference.

   I think that the class is practically useful as well.  At our
institution we prefer it to the timeDate class found in Splus5.  (But
then, I'm the section head, so you have to decide for yourself whether
this is a democratic or monarchist "we").  It's philosophy differs
from the timeDate class, as shown by two examples.  

> birth.dt <- mdy.date(c(9,9,9,5,8), c(29, 22,24,26,28), c(78, 81,83,85,87))
> birth.dt
[1] 29Sep78 22Sep81 24Sep83 26May85 28Aug87
> today <-    mdy.date(1, 18, 99)

> ages <- floor( (today - birth.dt)/365.25)
> ages
[1] 20 17 15 13 11
> birth.dt/3
[1] 2282.000 2645.000 2889.000 3092.333 3367.000


> birth.dt<- timeCalendar(c(9,9,9,5,8), c(29, 22,24,26,28), c(78, 81,83,85,87))
> birth.dt
[1] 09/29/78 00:00:00.000 09/22/81 00:00:00.000 09/24/83 00:00:00.000
[4] 05/26/85 00:00:00.000 08/28/87 00:00:00.000
> today   <- timeCalendar(1, 18,99)
> ages <- floor( (today - birth.dt)/365.25)
> ages
[1] 20d 0h 0m 0s 0MS 17d 0h 0m 0s 0MS 15d 0h 0m 0s 0MS 13d 0h 0m 0s 0MS
[5] 11d 0h 0m 0s 0MS
> birth.dt/3
Problem in birth.dt/3: Function does not make sense for times 
Use traceback() to see the call stack

  The timeDate class has much greater tenacity than my date class.  Division
by 3 does not make sense for a date, so my class "gives up" and returns an
integer, i.e., it preserves dates when possible but without demanding that
they be preserved.  The timeDate class refuses to do the division.  
For the age example, the date class correctly lists the current ages of
5 (very important) children.  The timeDate class creates a time span rather
than a difference, and then tries to retain those units.


