anchor.diff:    end;
   end;
   
  -function EncodeDateMonthFirstDayOfWeekBefore(const AYear, AMonth, ADayOfWeek, ABefore: Word): TDateTime;
  +function EncodeDateMonthFirstDayOfWeekBefore(const AYear, AMonth, ADayOfWeek, ABefore: Word): TPreciseTime;
   var
     LWeekDayDiff : Integer;
   begin
     { Generate a date with ABefore as the Day in AMonth and AYear }
  -  Result := EncodeDate(AYear, AMonth, ABefore);
  +  Result := EncodePreciseDate(AYear, AMonth, ABefore);
   
     { Adjust Date by difference in DayOfWeek of Date and ADayOfWeek.  If that difference is negative subtract a week. }
     LWeekDayDiff := DayOfTheWeek(Result) - ADayOfWeek;
  
positive.code: function TCompiledPeriod.GetLastRuleForYear(const AYear: Word): PRule;
  var
    LCurrRule: PYearBoundRule;
    LAbsolute, LBestChoice: TDateTime;
    I: Integer;
  begin
    { Default to nothing obviously }
  
negative.code: 
      { Add the the last year rule since 1 jan 00:00 this year }
      if LLastYearRule <> nil then
        LRules.Add(TCompiledRule.Create(Self, LLastYearRule, IncSecond(EncodePreciseDate(AYear, 1, 1),
          -1 * (LLastYearRule^.FOffset)), LLastYearRule^.FOffset, trStandard));
  
      { Obtain the first rule in chain }
      LCurrRule := FPeriod^.FRuleFamily^.FFirstRule;
  