Changeset 25 for branches/lazarus/UCore.pas
- Timestamp:
- Sep 8, 2010, 8:34:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/lazarus/UCore.pas
r24 r25 10 10 type 11 11 TArrayOfString = array of string; 12 TPageProducer = function: string;13 12 14 13 function MakeLink(Text, URL: string): string; … … 20 19 function ShowFooter: string; 21 20 function Explode(Separator: Char; Data: string): TArrayOfString; 22 function HumanDate(Date: string): string;21 function HumanDate(Date: TDateTime): string; 23 22 function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer): string; 24 23 function StrRepeat(Data: string; Count: Integer): string; … … 78 77 end; 79 78 80 function HumanDate(Date: string): string; 81 var 82 Parts: TArrayOfString; 83 Parts2: TArrayOfString; 79 function HumanDate(Date: TDateTime): string; 84 80 begin 85 Parts := Explode(' ', Date); 86 // Result := Date; 87 Parts2 := Explode('-', Parts[0]); 88 if Date <> '0000-00-00' then Result := IntToStr(StrToInt(Parts2[2])*1) + '.' + IntToStr(StrToInt(Parts2[1])*1) + '.' + Parts2[0] 89 else Result := ' '; 81 Result := FormatDateTime('d.m.yyyy', Date); 90 82 end; 91 83
Note:
See TracChangeset
for help on using the changeset viewer.