Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dateArrayToString(var DateOfPayArray: TDateOfPay): string;
- begin
- Result := copy(DateOfPayArray, 1, 2) + '.' + copy(DateOfPayArray, 3, 2) + '.' + copy(DateOfPayArray, 5, 4);
- end;
- function dateToNumber(var DateOfPayArray: TDateOfPay): TNumberOfdays;
- var
- NumberOfDaysLeft: integer;
- WritenTime, NowTime: TDateTime;
- StringTime: string;
- Difference: TNumberOfDays;
- DayDifferece: TNumberOfDays;
- ComparisonResult: integer;
- begin
- StringTime := dateArrayToString(DateOfPayArray);
- WritenTime := strToDate(StringTime);
- NowTime := Now();
- ComparisonResult := compareDate(WritenTime, NowTime);
- DayDifferece := daysBetween(WritenTime, NowTime);
- Difference := DayDifferece * ComparisonResult;
- Result := Difference;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement