Changeset 102 for trunk/Forms/UFormContact.pas
- Timestamp:
- Feb 8, 2022, 7:02:54 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.pas
r101 r102 273 273 end; 274 274 275 {$IF FPC_FULLVERSION<30200} 276 function TryISOStrToDate(const aString: string; out outDate: TDateTime): Boolean; 277 var 278 xYear, xMonth, xDay: LongInt; 279 begin 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; 296 end; 297 {$ENDIF} 298 275 299 { TFormContact } 276 300
Note:
See TracChangeset
for help on using the changeset viewer.