Changeset 102 for trunk


Ignore:
Timestamp:
Feb 8, 2022, 7:02:54 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Build under older Lazarus version.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.lfm

    r101 r102  
    456456        Anchors = [akTop, akLeft, akRight]
    457457        Caption = 'Address'
    458         ClientHeight = 259
     458        ClientHeight = 285
    459459        ClientWidth = 895
    460460        TabOrder = 6
  • trunk/Forms/UFormContact.pas

    r101 r102  
    273273end;
    274274
     275{$IF FPC_FULLVERSION<30200}
     276function TryISOStrToDate(const aString: string; out outDate: TDateTime): Boolean;
     277var
     278  xYear, xMonth, xDay: LongInt;
     279begin
     280  case Length(aString) of
     281    8: Result :=
     282          TryStrToInt(Copy(aString, 1, 4), xYear) and
     283          TryStrToInt(Copy(aString, 5, 2), xMonth) and
     284          TryStrToInt(Copy(aString, 7, 2), xDay) and
     285          TryEncodeDate(xYear, xMonth, xDay, outDate);
     286    10: Result :=
     287          TryStrToInt(Copy(aString, 1, 4), xYear) and
     288          TryStrToInt(Copy(aString, 6, 2), xMonth) and
     289          TryStrToInt(Copy(aString, 9, 2), xDay) and
     290          TryEncodeDate(xYear, xMonth, xDay, outDate);
     291  else
     292    Result := False;
     293  end;
     294  if not Result then
     295    outDate := 0;
     296end;
     297{$ENDIF}
     298
    275299{ TFormContact }
    276300
Note: See TracChangeset for help on using the changeset viewer.