anchor.diff:  function VarRecToVariant (AValue : TVarRec) : Variant;
   
   function CompareVariants (aVal1, aVal2 : variant) : integer;
  +
  +// cloned from LCLProc unit but with OnCompare procedure that can be a method of a class
  +// this to avoid singleton dilemma when comparing operations needs extra data
  +// as in virtualdataset Sort method and it is possible to write thread-safe code without shared singleton resources
  +// http://lazarus-ccr.sourceforge.net/docs/lcl/lclproc/mergesort.html
  +procedure MergeSort(List: TFPList; const OnCompare: TListSortCompare);
   
   {$IFDEF FPC}
   function CharInSet(C: Char; const CharSet: TSysCharSet): Boolean;
  
positive.code:   {$MODE DELPHI}
  {$ENDIF}
  
  uses SysUtils, Variants;
  
  const
    TheDayWhenTimeStarted = 730120; //01/01/2000 (starting from 01/01/01)
  
  function GenerateRandomIdString : string; overload;
  function GenerateRandomIdString(aLength : integer): string; overload;
  
  
negative.code: function DateTimeToSeconds(const aDateTime : TDateTime; const aTheDayWhenTimeStarted : integer = TheDayWhenTimeStarted) : integer;
  function SecondsToDateTime(const aSeconds : integer; const aTheDayWhenTimeStarted : integer = TheDayWhenTimeStarted): TDateTime;
  
  // try to convert the input text from the user as a date value, if it fails it returns a blank string
  // user can edit date as ddmmyy or ddmmyyyy or dmyy or with separators like '/', '\', '-', ....
  function TryToUnderstandDateString(const aInputString : String; var aValue : TDateTime) : boolean;
  
  