home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / WIN / Programa / ADDATE32.ZIP / ADDATES.HIS < prev    next >
Encoding:
Text File  |  1996-09-02  |  7.1 KB  |  201 lines

  1. TAdrockDate Class History File
  2. ==============================
  3.  
  4. 1st March, 1996    Version 1.00
  5.  
  6.     NEW & UPDATED FEATURES
  7.     ----------------------
  8.     Initial Release to Compuserve.....
  9.  
  10. 8th March, 1996    Version 1.10
  11.  
  12.     NEW & UPDATED FEATURES
  13.     ----------------------
  14.     Added some Business and Holiday Routines..
  15.     
  16.     Function  IsDateWithinRange(TestDate, FirstDate, LastDate : TDatetime)    : Boolean;
  17.     Function  NextBusinessDay(RequiredDate : TDateTime)  : TDateTime;
  18.     Function  PrevBusinessDay(RequiredDate : TDateTime)  : TDateTime;
  19.     Function  ReturnBusinessDaysBetweenDates(FirstDate, LastDate : TDatetime) : Integer;
  20.     Function  VerbalDate(WorkDate : TDatetime) : String;
  21.     
  22.     Function  IsMonday(WorkDate : TDateTime) : Boolean;
  23.     Function  IsTuesday(WorkDate : TDateTime) : Boolean;
  24.     Function  IsWednesday(WorkDate : TDateTime) : Boolean;
  25.     Function  IsThursday(WorkDate : TDateTime) : Boolean;
  26.     Function  IsFriday(WorkDate : TDateTime) : Boolean;
  27.     Function  IsSaturday(WorkDate : TDateTime) : Boolean;
  28.     Function  IsSunday(WorkDate : TDateTime) : Boolean;
  29.     
  30.     Function  IsJanuary(WorkDate : TDateTime) : Boolean;
  31.     Function  IsFebruary(WorkDate : TDateTime) : Boolean;
  32.     Function  IsMarch(WorkDate : TDateTime) : Boolean;
  33.     Function  IsApril(WorkDate : TDateTime) : Boolean;
  34.     Function  IsMay(WorkDate : TDateTime) : Boolean;
  35.     Function  IsJune(WorkDate : TDateTime) : Boolean;
  36.     Function  IsJuly(WorkDate : TDateTime) : Boolean;
  37.     Function  IsAugust(WorkDate : TDateTime) : Boolean;
  38.     Function  IsSeptember(WorkDate : TDateTime) : Boolean;
  39.     Function  IsOctober(WorkDate : TDateTime) : Boolean;
  40.     Function  IsNovember(WorkDate : TDateTime) : Boolean;
  41.     Function  IsDecember(WorkDate : TDateTime) : Boolean;
  42.     
  43.     Function  IsWeekend(WorkDate : TDateTime) : Boolean;
  44.     Function  IsWeekday(WorkDate : TDateTime) : Boolean;
  45.     
  46.     Function  IsAM(WorkDate : TDateTime) : Boolean;
  47.     Function  IsPM(WorkDate : TDateTime) : Boolean;
  48.     Function  IsMorning(WorkDate : TDateTime) : Boolean;
  49.     Function  IsAfternoon(WorkDate : TDateTime) : Boolean;
  50.     
  51.     Function  IsMidday(WorkDate : TDateTime) : Boolean;
  52.     Function  IsMidNight(WorkDate : TDateTime) : Boolean;
  53.     
  54.     Function  IsChristmasDay(WorkDate : TDateTime) : Boolean;
  55.     Function  IsNewYearsDay(WorkDate : TDateTime) : Boolean;
  56.     
  57.     Function  IsFirstOfTheMonth(WorkDate : TDateTime) : Boolean;
  58.     Function  IsLastOfTheMonth(WorkDate : TDateTime) : Boolean;
  59.     Function  IsBusinessDay(WorkDate : TDateTime) : Boolean;
  60.     Function  IsDateInPosNegRange(WorkDate, CompareDate : TDateTime; PositiveDays, 
  61.     NegativeDays : Integer) : Boolean;
  62.     Function  IsDateInPosNegBusinessRange(WorkDate, CompareDate : TDateTime; PositiveDays, 
  63.     NegativeDays : Integer) : Boolean;
  64.     Function  AddBusinessDays(NumberOfDays : Integer; WorkDate :TDateTime) : TDateTime;
  65.     
  66.     Function  IsHoliday(WorkDate : TDateTime) : Boolean;
  67.     Function  IsBusinessHoliday(WorkDate : TDateTime) : Boolean;
  68.     Procedure SetHolidayStringList(NewHolidayStringList : TStrings);
  69.  
  70. 9th April, 1996    Version 1.20
  71.  
  72.     NEW & UPDATED FEATURES
  73.     ----------------------
  74.     Added function IsEmpty() which tests for an empty date string being passed.
  75.     Added function ReturnFirstOfAWeek() which will return the date for the first day of 
  76.     the week for any starting week day.
  77.     Added function ReturnLastOfAWeek() which will return the date for the last day of the 
  78.     week for any starting week day.
  79.     
  80.     All the functions in the class can now be called directly without having to declare a 
  81.     TAdrockDate variable. All the functions have the same names, and parameters as they do 
  82.     in the class.
  83.     
  84.     Below is how you USE TO HAVE to call the routines..
  85.     
  86.     Uses AdDate;
  87.     
  88.     procedure TTestForm.Button1Click(Sender: TObject);
  89.     Var
  90.       AdDate  : TAdrockDates
  91.       IsValid : Boolean;
  92.     begin
  93.       AdDate := TAdrockDates.Create;
  94.       IsValid := AdDate.IsValidDate('55/55/96');
  95.       AdDate.Free;
  96.     end;
  97.     
  98.     Below is the NEWER EASIER way to call the routines in the class.....
  99.     
  100.     Uses AdDate;
  101.     
  102.     procedure TTestForm.Button1Click(Sender: TObject);
  103.     Var
  104.       IsValid : Boolean;
  105.     begin
  106.       { !! IsValidDate returns true or false, it never causes an exception !!}
  107.       IsValid := IsValidDate('55/55/96');
  108.     end;
  109.  
  110. 13th June, 1996    Version 1.30
  111.  
  112.     BUG FIX'S & MODIFICATIONS
  113.     --------------------------
  114.     We have fixed a bug (Not Ours) that hopefully not many people have seen.
  115.             
  116.     The problem occurs only during linking and the error is:
  117.     
  118.     Error(0) : Overflow in conversion or arithmetic operation
  119.     
  120.     After talking to Borland Tech Support in Sydney,Austrailia we were no better off, but 
  121.     after searching around the WEB we found a fix for it. 
  122.     
  123.     We thank Duncan Murdock that submitted the bug and fix for it to the web site 
  124.     (http://www.DataWeb.nl/~r.p.Sterkenburg/bugs2 )
  125.     
  126.     The error is definitly a BORLAND DELPHI COMPILER / LINKER ERROR.
  127.     
  128.     The code below will reproduce the bug.
  129.     ***********************************
  130.     
  131.     Unit ConstBug;
  132.     
  133.     Interface
  134.             
  135.     Const
  136.       c1 = 1.0;
  137.       c2 = 2.0;
  138.                 
  139.     Implementation
  140.     
  141.     end.
  142.     
  143.     ***********************************
  144.     Mr Murdock states, just add this unit to a project and make it twice. On the second 
  145.     make when ConstBug.DCU is just being linked( Not Compiled) you should get the error. 
  146.     (I tried it and it did not fail) but it did definitly prove that the error is produced 
  147.     when using floating point constants. I added 3 floating point constants to our 
  148.     AdDate.PAS and when it did fail I had 3 error(0)'s.
  149.     
  150.     When the ConstBug code above does fail you will get 2 error (0)'s.
  151.     
  152.     We will be informing Borland Tech Support of this bug and fix.
  153.     
  154.     The FIX?, use Typed Constants rather than UnTyped Constants.
  155.     
  156.     Instead of   c1 = 1.0;   Use   c1 : Single = 1.0;
  157.  
  158. 28th June, 1996    Version 1.40
  159.  
  160.     BUG FIX'S & MODIFICATIONS
  161.     --------------------------
  162.     There was a bug in a routine that checks for leap years. I had the leap year checking 
  163.     routine calling IsLeapYear(TDateTime) when it should have been calling 
  164.     IsLeapYearI(Integer).
  165.  
  166. 4th July, 1996    Version 1.50
  167.  
  168.     BUG FIX'S & MODIFICATIONS
  169.     --------------------------
  170.     There was a bug in the FormatDate routine, the bug would only occur if you used the 
  171.     special Z parameter to put the week day st, nd, rd, or th into the return string.The 
  172.     bug was I was calling ReturnDayTH() instead of ReturnDayTHi().
  173.  
  174. 19th July, 1996    Version 1.60
  175.  
  176.     BUG FIX'S & MODIFICATIONS
  177.     --------------------------
  178.     Fixed a bug in the week number calculation routines, some weeks on the year boundry 
  179.     would state the wrong week, all other weeks were fine.
  180.  
  181. 8th August, 1996    Version 1.70
  182.  
  183.     BUG FIX'S & MODIFICATIONS
  184.     --------------------------
  185.     There was a bug in the AddBusinessDays function when using negative dates. The date 
  186.     would not decrement when using negative values. The bug was the result of not using 
  187.     ABS() around the number of days so it would work with either posative or negative 
  188.     values.
  189.  
  190. 14th August, 1996    Version 1.80
  191.  
  192.     BUG FIX'S & MODIFICATIONS
  193.     --------------------------
  194.     Correct a problem in the AddMonths() function when using negative dates like -9.
  195.  
  196. Adrock Software, Byte Computer & Software Ltd
  197. CompuServe 770135,110  Internet ADROCK@USA.NET
  198. http://WWW.MailHost.Net/~Byte
  199.  
  200. 2nd September, 1996  02:27 PM
  201.