home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / DATECL.ZIP / DATECL49.DOC < prev    next >
Text File  |  1994-01-26  |  26KB  |  591 lines

  1. =======================================================
  2. Documentation for "The Killer Date Class!" Version 4.00
  3. =======================================================
  4.  
  5. History
  6. =======
  7. In the beginning Steve Marcus (CIS 72007,1233) posted a basic date
  8. manipulation/arithmetic class produced with Borland C++ 2.0 in the 
  9. BPROGB forum, with a request for suggestions and enhancements. This was
  10. on 6/19/91.
  11.  
  12. A rather enterprising gentleman by the name of Eric Simon (CIS 70540,1522)
  13. accepted the challenge, and produced a new and improved version in the 
  14. course of a project he was developing at work. He contributed the results
  15. to the forum on 6/29/91, also inviting enhancements and comments.
  16.  
  17. About that time yet another enterprising gentleman named Christopher Hill
  18. developed a need for a universal date conversion routine for use in a
  19. business project he was developing as well.  Browsing the same forum, he
  20. encountered Eric's class, which provided much of the functionality he needed
  21. - the basic julian-gregorian and day of week conversion algorithms -
  22. relieving him of the task of researching or re-inventing them. Eric had also
  23. added overloaded + and - operators for incrementing date objects by integer
  24. days, as well as several print functions.  Chris needed additional features
  25. for his implementations, thus was born versions 3.0 and 3.1(Hill & Simon).
  26.  
  27. Well, almost a year later I sent out an SOS for a date class so _I_ didn't
  28. have to re-invent the wheel and lo-and-behold Chris responded.  Thus begins
  29. the saga of version 4.0!  I would like to take this opportunity to do a
  30. little witnessing: I looked all over for a date class that would suit my
  31. needs!  I reviewed many implementations from strangers and friends alike
  32. and I am here to tell ya' folks, "It don't 'git no bedder 'n dis!"  This
  33. class is _VERY_ cool!  Now I'm not trying to say that there's no more
  34. room for enhancements (I'd really be crazy then!), but I am saying that if
  35. your looking for a _GOOD_ date class (I'd say commercial quality because
  36. I have yet to see a commercial product that implemented a date class to
  37. my satisfaction!) then this is it!  So jump in and add to it, make it
  38. better and we'll SAVE THE WORLD!  (Ok, so I got a little carried away at
  39. the end. Just a little...)
  40.  
  41. No, but really...
  42. This is a truly pleasing example of co-operation among professionals, and
  43. an "object" study in the code reusability of OOP, resulting in three releases
  44. of one class within a single month by three different analysts who have never
  45. met, and yet another upgrade almost a year later by a fourth analyst (myself)
  46. and none of us have yet to meet!  Chris thanks Steve and Eric for their
  47. inspiration and generousity, and I thank all three as well and hereby
  48. contribute my additions to the public domain.
  49.  
  50. I believe any of us would welcome further comments, suggestions and
  51. enhancements as well.
  52.  
  53. Good luck!  May the quest for the perfect date class continue!
  54.  
  55.             v4.9  Ly Minh Trí      - 73062,512   01/26/94
  56.             v4.8  Clyde Ford       - 71426,72    11/18/93
  57.             v4.7  Ly Minh Trí      - 73062,512   09/20/93
  58.             v4.6  Ly Minh Trí      - 73062,512   08/04/93
  59.             v4.5  Ly Minh Trí      - 73062,512   06/21/93
  60.             v4.4  Ly Minh Trí      - 73062,512   06/03/93
  61.             v4.3  Ly Minh Trí      - 73062,512   03/24/93
  62.             v4.2  Ly Minh Trí      - 73062,512   03/13/93
  63.             v4.1  Kenneth A. Argo  - 71241,3635  03/07/93
  64.             v4.0  Charles Price    - 70541,3651  06/27/92
  65.             v3.1  Hill & Simon     -             08/05/91
  66.             v3.0  Christopher Hill - 72030,2606  07/11/91
  67.             v2.0  Eric Simon       - 70540,1522  06/29/91
  68.             v1.0  Steve Marcus     - 72007,1233  06/16/91
  69.  
  70. ===============================================================================
  71. TML - 01/26/94
  72.  
  73. Version 4.9 fixes the Date::AddMonths() member function.  The problem was it
  74. did not adjust the day value after the new month's value have been calculated.
  75. For example, if the current date is '08/31/1993' and 6 months is added to it
  76. using Date::AddMonths(), then the result is: 02/31/1994.  Date::AddMonths()
  77. will now set the day value as appropriate for the new month.  If the day value
  78. is greater than the # of days in that month, then it will roll the month over
  79. to the next month and set the day value to the difference between the day
  80. value and the # of days in the that month.  Thanks to Patrick Cunningham this
  81. bug.
  82.  
  83. This version also expands the Date::isDST() functionality by adding two new
  84. member functions: Date::setDST() and Date::setSTD().  Date::setDST() sets the
  85. month and day on which DST date begins.  Likewise, Date::setSTD() sets the
  86. month and day on which STD date begins.  Thanks to Marcelos Cantos for this
  87. suggestion.
  88.  
  89. ***********************    WARNING TO BORLAND C++ USERS   *********************
  90.  
  91. A couple of people have kindly informed me that the class Date is a pre-defined
  92. class in Borland C++.  Thus, you will have to rename this class to another name
  93. like xDate, or DateCL or whatever is appropriate for your implementation!!!
  94.  
  95. *******************************************************************************
  96.  
  97. ===============================================================================
  98. TML - 11/18/93
  99.  
  100. Version 4.8 adds a new member function Date::isDST() which was contributed by
  101. Clyde Ford (CIS 71426,72).  Date::isDST() determines if the current date object
  102. is "within daylight savings time as defined in the United States".  If so, then
  103. it will return 1, otherwise a 0 is returned.
  104.  
  105. Please note that my CIS address has changed to 73062,512.  If anyone have
  106. added new functions to DateClass and feel others may benefit from it, feel
  107. free to send me your code so I may incorporate it into future versions of
  108. DateClass.  Or if you prefer, just incorporate the code, document your
  109. additions and upload it...
  110.  
  111. ===============================================================================
  112.  
  113. TML - 09/20/93
  114.  
  115. Version 4.7 un-fixes the serious bug in the code for unary operators ++/--. In
  116. other words, they were originally correct.  I guess I got really confused when
  117. I last talked to Jorge.
  118.  
  119. Thanks to James M. Curran for informing me of this change.  Also, James has a
  120. new version of DateClass (5.0) currently in the works.  I think all of us will
  121. be very impress and receptive of his version!!!
  122.  
  123. ===============================================================================
  124. TML - 08/04/93
  125.  
  126. Version 4.6 fixes the Date::AddMonths() member function.  It does not add or
  127. subtract the number of months correctly.
  128.  
  129. Thanks to Patrick Cunningham for finding this bug!
  130.  
  131. ===============================================================================
  132. TML - 06/21/93
  133.  
  134. Version 4.5 fixes a very serious bug in the code for unary operators ++/--.  I
  135. confused myself with the formats for prefix and postfix operations.  (I got
  136. them reversed.)  Jorge Padron was kind enough to inform me of my mistake.
  137.  
  138. I also removed the 'const' keyword from parameter statements for functions which
  139. require variables to be passed by values (as opposed to pass by reference.)  For
  140. example,
  141.             Date  operator + (const long i);
  142.  
  143. is changed to:
  144.  
  145.             Date  operator + (long i);
  146.  
  147. I did it in the first place because I was trying to be consistent, but I realize
  148. that this can be confusing (especially those that are just learning C++).  Jorge
  149. also pointed this out to me.
  150.  
  151. ===============================================================================
  152. TML - 06/03/93
  153.  
  154. Version 4.4 adds a little validation to the value of the day and month when an
  155. object is created via a string argument.  For example, month must be from
  156. (1..12) and day must be from (1..n) where 'n' is the number of days for the
  157. given month.
  158.  
  159. Thus, the following statements:
  160.  
  161.      Date myDate("02/31/1993");
  162.      cout << myDate.formatDate() << "\n";
  163.  
  164. will result in an "invalid date" output!
  165.  
  166. ===============================================================================
  167.  
  168. TML - 3/15/93
  169.  
  170. Well, I must say, this is quite an impressive Date class!!!  And I must
  171. agree with Mr. Kenneth...it's probably one of the BEST (if not the best) Date
  172. class I've seen so far (but then again, I've not seen too many!).
  173.  
  174. However, I thought it really could take more advantage of some of the better
  175. features of C++ (ie. encapsulation!!!).  Thus, I decided to take on the
  176. challenge set forth by the aforementioned 'Date'-crazed group.
  177.  
  178. My changes are listed below in the Version 4.2 section.  Please let me know
  179. of any updates/changes that will happen in the future!!!
  180.  
  181. And ofcourse, we all welcome any comments/suggestions/participations!!!
  182.  
  183. Ly Minh Trí :)
  184.  
  185. ===============================================================================
  186.  
  187. Implementation Notes
  188. ====================
  189.  
  190.    All versions prior to 4.0 were written specifically for a Borland C++
  191.    compiler.  However, version 4.0 was written specifically for
  192.    Microsoft C++ 7.0.  I too have attempted to optimize the code including
  193.    the specification of const where applicable, the passing of references
  194.    where advisable, and the use of constructor initializers where needed.
  195.    However, I have not made an exhaustive analysis of this subject either.
  196.  
  197.    To get the best overview of the class capabilities run the demo program.
  198.    It may not look pretty, but with a printout of a sample run and the code
  199.    you should be able to get a really good feel for it.  I have included a
  200.    samples run at the end of this file in case someone doesn't want to
  201.    take the time to compile the demo program.
  202.  
  203.    This ZIP file contains:
  204.  
  205.       MAKEFILE      -   make file to compile & link the files for MSC 7.0
  206.       DATEDEMO.PRJ  -   project file for compiling under Borland C++ 3.1
  207.       DATECL48.DOC  -   this file
  208.       DATECL.H      -   the header file
  209.       DATECL.CPP    -   the member functions
  210.       DATEDEMO.CPP  -   a test program (and a messy one at that!)
  211.       DATECL.LIB    -   a lib file so you can use it even if you
  212.                         don't have MSC7.0, or you just don't feel
  213.                         like fussin' with it!  (Added in v4.0)
  214.  
  215.  
  216. Future possibilities for enhancement include
  217. ============================================
  218.     
  219.    1. Adding a derived Time class, for those applications which require
  220.       the ability to track more than just dates. This would allow the
  221.       manipulation of times for all dates (not just since 1980), and
  222.       arithmetic calculations as well.
  223.  
  224. ===============================================================================
  225.  
  226. Additions/Changes to Version 4.5
  227. ================================
  228.  
  229. -   Correct the implementation code for the unary operators ++ and --.  These
  230.     were reversed in version 4.2 to 4.3 (i.e. prefix was coded as postfix, and
  231.     postfix was coded as prefix).
  232.  
  233. -   Removed 'const' keyword from parameter statments that requires variables to
  234.     be passed by value.
  235.  
  236. ===============================================================================
  237.  
  238. Additions/Changes to Version 4.4
  239. ================================
  240.  
  241. -   Add a little validation to value of the day and month when an object is
  242.     created via a string argument.
  243.  
  244. ===============================================================================
  245.  
  246. Additions/Changes to Version 4.3
  247. ================================
  248.  
  249. -   Add more flexibility in the constructor to support the many string formats
  250.     that are used by the Date class.
  251.  
  252. -   Fix Date::Date(char *) and make it accept the string as a 'const' argument.
  253.     Also, make a copy of the string ('dat') before passing it to strtok() since
  254.     this function modifies its argument!
  255.  
  256. -   Remove the smaller buffer ('buf') and make use of only one buffer to save
  257.     memory.
  258.  
  259. -   Re-code the type cast operator to call formatDate() so the current format
  260.     and options will be applied to the resulting string.
  261.  
  262. -   Changed year to 'int' type to support B.C.E. dates.
  263.  
  264. ===============================================================================
  265.  
  266. Additions/Changes to Version 4.2
  267. ================================
  268.  
  269. -   Made it compatible to both Borland C++ (v 3.1) and Microsoft C++ (v 7.0)
  270.     via #define switches.  Define _BCC for Borland and _MSC for Microsoft.
  271.     See the GO.BAT batch file!
  272.  
  273. -   Fix memory problems in Version 4.1.  There were three 'deadly' memory
  274.     threats introduced by Version 4.1:
  275.  
  276.         (a) In the destructor function, it is erroneous to delete buf without
  277.             referring to it as a vector of characters.  The proper method
  278.             would be:
  279.                             delete [] buf;      // Must have the brackets!
  280.  
  281.             Please review the section "The Free Store and Class Arrays" on
  282.             page 95-99 of the _C++ Tutorial_ from Microsoft's C++ package!
  283.  
  284.         (b) In the Date::operator char *() function, variable buf was allocated
  285.             space every time the function was called.  This causes memory leaks
  286.             when the same Date instance calls this operator function more than
  287.             once during its lifetime.
  288.  
  289.         (c) Also in the Date::operator char *() function, variable buf was
  290.             assigned the address of the constant string BadDate without prior
  291.             release of the memory for buf.
  292.  
  293. -   Modified the following functions to return a Date object instead of a
  294.     reference to a Date object!
  295.  
  296.         Date operator + (const long i);
  297.         Date operator +  (const int  i);
  298.         Date operator - (const long i);
  299.         Date operator - (const int  i);
  300.         Date operator ++ ();
  301.         Date operator ++ (int);
  302.         Date operator -- ();
  303.         Date operator -- (int);
  304.  
  305.     This is important because in Version 4.0 and before, the binary operators
  306.     (+ and -) were declared to return references to Date objects since these
  307.     functions dynamically creates a Date object when the function is called.
  308.     However, there were no provisions for deleting these objects once they
  309.     leave the scope of the function.
  310.  
  311.     In Version 4.1, Mr. Kenneth got rid of this problem of allocation by
  312.     forcing the compiler to generate code to allocate stack space to return
  313.     the objects.  However, Mr. Kenneth 'forget?' to remove the references
  314.     declaration.  Why would this cause problem?  Because when the calling
  315.     program is expecting a reference in return (as opposed to a copy of the
  316.     object), then that reference will be invalid since after the function
  317.     terminates, the temporary object (used to return the value to the calling
  318.     program) will also be terminated.  Thus, the reference to the object is
  319.     rendered obsolete.
  320.  
  321.     To test this, I wrote the following program:
  322.  
  323.  
  324.     #include "datecls4.h"
  325.     #include "iostream.h"
  326.  
  327.     void showDate(Date &dt)
  328.     {
  329.         cout << dt;                 // The (char *) type cast operator is in
  330.     }                               // effect here!
  331.  
  332.     void main()
  333.     {
  334.         Date z("04/13/1967");
  335.         showDate(z+3);
  336.     }
  337.  
  338.     RESULT:
  339.     *** destructor called ***       // Temporary oject is destroyed
  340.     237/7/21
  341.     *** destructor called ***       // Object 'z' is destroyed
  342.  
  343.  
  344.     As dictated by the result, the temporary object (created by the + operator)
  345.     is destroyed before its values are displayed.
  346.  
  347.     By declaring the functions to return an actual Date object instead of a
  348.     reference, we force the compiler to make a copy of it and return it to the
  349.     calling program!
  350.  
  351. -   Fix implementation of the prefix/postfix operators to properly reflect the
  352.     before/after syntax of the unary incrementor.  (C++ provides only the
  353.     the facility to determine which type of operator is being used, but the
  354.     implementation is left to the programmer!)
  355.  
  356. -   Moved all buffer variables to the class level and made them private static
  357.     member data.
  358.     . for the Date::formatDate() function, the buffer is renamed to 'cbuf'
  359.     . for the Date::Operator () function, the buffer is named 'buf'
  360.  
  361. -   Move all publically declared variables/enums into the public portion of
  362.     the class.  Also redefine the #define constants to an enum type.  By doing
  363.     this, we are taking advantage of C++'s encapsulation feature and reduce
  364.     pollution of the global variable names.  This concept is based on the ios
  365.     class. (ie. ios::hex, ios::dec, etc.)
  366.  
  367. -   Also redeclare the 'friend' functions to be member functions (again, making
  368.     use of encapsulation!)
  369.  
  370. -   Rewrote the Date::SetOption() function.  (Made it more compact!)
  371.  
  372. -   Made use of the 'const' feature of C++ to ensure the references returned by
  373.     most of the member functions will be non-modifiable by the calling program.
  374.     (ie. force them to make a copy of it if they want to modify it!)
  375.  
  376. -   In the function Date::formatDate(), for the case Date::EUROPEAN and
  377.     Date::EUROPEAN, fix the code (day_of_week < 0) to (day_of_week < 1).  Also
  378.     removed the statement strcat(cbuf, " ") and put the space into the
  379.     sprintf() statement:
  380.  
  381.             sprintf( cbuf+strlen(cbuf), " %d", abs(year) );
  382.  
  383. ===============================================================================
  384.  
  385. Additions/Changes to Version 4.1
  386. ================================
  387.  
  388. Fixed date display when using the * operator to get a string pointer.
  389.   The code would return xx/xx/  xx if you only supplied a 2 digit year.
  390. Optimized the * operator so Invalid Dates would use a common "invalid date"
  391.   text pointer.
  392. Fixed the +, - and * operators to get rid cases where memory leaks would
  393.  occur.
  394. Fixed some variable casts so the code can be compiled with /W4
  395. Added a destructor tp delete items created dynamically on behalf of the
  396.  object (ie. char *).
  397.  
  398. Release Documentation for Version 4.0
  399. =====================================
  400. Most of the modifications made to version 3.1 were to expand the public
  401. interface.  Below is a list of new features in v4.0:
  402.  
  403.     1. Date &Set() - Sets self to current system date; this may also be
  404.          accomplished by passing initializing a date object like so:
  405.          Date oDate1("Today");  // See demo for examples
  406.  
  407.     2. Date &Set(long lJulian) - Sets self to the specified julian date
  408.  
  409.     3. Date &Set(int nMonth, int nDay, int nYear) - Sets self to specified
  410.          month, day, and year.  The year must be 4 numbers long, not 2.
  411.  
  412.     4. Date &AddWeeks(int nCount = 1) - Add or subtract(use a negative int)
  413.          a specified number of weeks to/from self
  414.  
  415.     5. Date &AddMonths(int nCount = 1) - Add or subtract(use a negative int)
  416.          a specified number of months to/from self
  417.  
  418.     6. Date &AddYears(int nCount = 1); - Add or subtract(use a negative int)
  419.          a specified number of years to/from self
  420.  
  421.     7. int   Day() const - Returns numeric day of the month for self
  422.     8. int   DaysInMonth() - Returns number of days in month (1..31)
  423.     9. int   FirstDOM() const - Returns the First Day Of Month for self as a
  424.          numeric (1..7)
  425.  
  426.    10. char *CDOW() - Returns character Day Of Week ('Sunday'..'Saturday')
  427.    11. int   NDOW() const - Returns the numeric day of the week for self(1..7)
  428.  
  429.    12. int   WOM() - Returns numeric Week Of Month  (1..6)
  430.    13. int   WOY() - Returns numeric Week Of Year   (1..52)
  431.  
  432.    14. char *CMonth() - Character Month name ("January")
  433.    15. int   NMonth() const - Month Number (1..12)
  434.  
  435.    16. Date  BOM() - Returns a new date object that is the First Date Of
  436.          the Month in self.  For example:
  437.         Date oDate1;
  438.         Date oDate2("Today");
  439.         oDate1 = oDate2.BOM();
  440.  
  441.    17. Date  EOM() - Returns a new date object that is the Last Date Of
  442.          the Month in self.  (See example in 16 above)
  443.  
  444.    18. int   NYear4() const - Returns the numeric value of the year for self
  445.          in the form 1992.
  446.  
  447.    19. Date  BOY() - Returns a new date object that is the First Date Of
  448.          the Year in self. (See example 16 above)
  449.  
  450.    20. Date  EOY() - Returns a new date object that is the Last Date Of
  451.          the Year in self. (See example 16 above)
  452.  
  453.    21. Added overloaded operators for + and - to accept int's.
  454.    22. Added overloaded operators for ++ and -- for Postfix notation
  455.  
  456.    23. Switched from the Borland style DOS date structure(date) to the
  457.        Microsoft version(_dosdate_t).
  458.  
  459. Suggestions and general comments are always welcome!
  460. Enjoy!  Chuck :-}
  461.  
  462.  
  463.  
  464. Release Documentation for Version 3.1
  465. =====================================
  466. Subsequent to release 3.00, we (Hill & Simon) decided to collaborate on
  467. several further releases of this date class. This, the first, contains two
  468. new features, as well as a few minor bug fixes.
  469.  
  470. 1. There was a minor bug in the original Computer Language julian/gregorian
  471.    date conversion routines having to do with negative years.
  472.  
  473. 2. The isLeapYear function did not take into account that, prior to 1582,
  474.    years ending in 00 were also leap years.
  475.  
  476. 3. The two-dimensional array of the number of days in each month has been
  477.    eliminated in favor of a computational approach.
  478.  
  479. 4. The function Date::setFormat(XXXX) maintains a static variable (one
  480.    occurance for all Date objects, which controls the format which the
  481.    << operator uses to print objects. "XXXX" can be MONTH, MDY, DAY, FULL,
  482.    or EUROPEAN.  The setting defaults to MDY, but once altered, remains
  483.    altered until reset by another call to setFormat.
  484.  
  485.    The function Date::setOption(Option, Action) maintains a similar static
  486.    variable which enables certain print formatting options. Available options
  487.    at this point are:
  488.       NO_CENTURY  --  Suppress the printing of the century when
  489.               in the MDY format (ex: 01/01/91 instead of
  490.               01/01/1991).
  491.  
  492.       DATE_ABBR   --  Abbreviate month and day names when printing
  493.               in the MONTH, DAY, FULL or EUROPEAN formats.
  494.               (ex. MON, TUE, JAN, FEB, etc.) The length
  495.               or the abbreviation is controlled by a
  496.               DEFINED constant in DATECL31.HPP named
  497.               ABBR_LENGTH, preset to 3.
  498.  
  499.    "Action" is either ON or OFF, and defaults to ON. (Example, the call
  500.    Date::setOption(NO_CENTURY) turns on the century suppression option, and
  501.    it remains set until the call Date::setOption(NO_CENTURY, OFF) is made.
  502.  
  503.    More features, including further expanded print formatting features,
  504.    the derived Time class mentioned above, conversion into various calendar
  505.    formats (Jewish, Chinese, Arabic, etc.), ability to increment Date objects
  506.    by years and months instead of merely days, holiday computations, and more
  507.    are planned.
  508.  
  509.  
  510. Sample run of DATEDEMO.EXE v4.0
  511. ===============================
  512.  
  513.  Date Class v4.0 Demo 
  514.  
  515. Saturday, October 20, 1962
  516. Monday
  517. Tuesday, October 10, 1995
  518. Tuesday, October 30, 1962
  519. 5 October 1962
  520. -14
  521. 8/6/1991
  522. Tommorrow= Sunday, July 14, 1991
  523. a1 (7-14-91) < 8-01-91 ? ==> TRUE
  524. a1 (7-14-91) > 8-01-91 ? ==> FALSE
  525. a1 (7-14-91)== 7-14-91 ? ==> TRUE
  526. a1 (7-14-91)== a3 (7-14-91) ? ==> TRUE
  527. a1 (7-14-91)== a4 (7-15-91) ? ==> FALSE
  528. Today is: 6/28/1992
  529. Today (a4) is: 6/28/1992
  530. Today + 4 is: 7/2/1992
  531. Today - 4 is: 6/24/1992
  532. =========== Leap Year Test ===========
  533. Wednesday, January 15, 1992     Leap    day of year:  15
  534. Tuesday, February 16, 1993      non-Leap        day of year:  47
  535. =========== eom test ==============
  536. b1.eom() (s/b 2/28/91) ==> 2/28/1991
  537. ================== getDate test =====================
  538. a1.getDate()  (s/b 2/16/1993) ==> 2/16/1993
  539. ================== string assignment test ====================
  540. a1 as a string (s/b 2/16/1993) ==> 2/16/1993
  541. ================== setFormat test ============================
  542. a1 (s/b FULL format) ==> Tuesday, February 16, 1993
  543. a1 (s/b EUROPEAN format) ==> 16 February 1993
  544. ================== setOption test ============================
  545. Date abbreviation ON
  546. a1 (s/b MONTH format) ==> Feb
  547. a1 (s/b DAY format) ==> Tue
  548. a1 (s/b FULL format) ==> Tue, Feb 16, 1993
  549. a1 (s/b EUROPEAN format) ==> 16 Feb 1993
  550. Century suppression ON
  551. a1 (s/b MDY format) ==> 2/16/93
  552. Century suppression OFF
  553. a1 (s/b MDY format) ==> 2/16/1993
  554. Century suppression ON
  555. a1 (s/b MDY format) ==> 2/16/93
  556. a1 (s/b FULL format) ==> Tue, Feb 16, 1993
  557.  
  558. =============== Version 4.0 Enhancement Test =================
  559.  
  560. ---------- Set Stuff -----------
  561. First, 'Set' to today...
  562. Before 'Set' => Saturday, November 26, 1966
  563. After  'Set' => Sunday, June 28, 1992
  564.  
  565. Set to 11/26/66 => Saturday, November 26, 1966
  566. Current Julian  => 2439455
  567. Set to Julian 2450000L => Tuesday, October 10, 1995
  568. See! => 2450000
  569. ---------- Add Stuff -----------
  570. Start => Tuesday, October 10, 1995
  571. Add 4 Weeks => Tuesday, November 7, 1995
  572. Sub 1 Month => Saturday, October 7, 1995
  573. Add 2 Years => Tuesday, October 7, 1997
  574. ---------- Misc Stuff -----------
  575. The date aboves' day of the month is => 7
  576. There are 31 days in this month.
  577. The first day of this month lands on 4
  578. This day happens to be Tuesday
  579. the 3 day of the week,
  580. on the 41 week of the year,
  581. on the 2 week of the month, 
  582. (which is October)
  583. the 10nth month in the year.
  584. The year alone is 1997
  585. ---------- First and Last Stuff -----------
  586. The first date of this month is Monday, June 1, 1992
  587. The last date of this month is Tuesday, June 30, 1992
  588. The first date of this year is Wednesday, January 1, 1992
  589. The last date of this year is Thursday, December 31, 1992
  590.  
  591.