On 27/02/2016 12:08, Jonas Maebe wrote:
If something is platform-specific, it generally does not belong as a
language extension.
It's the same as existing %DATE% and %TIME%, plus few mathematical
operations, no extra dependencies.
// Existing function used for %DATE% in globals.pas:
function getdatestr:string;
var
st: TSystemTime;
begin
GetLocalTime(st);
getdatestr:=L0(st.Year)+'/'+L0(st.Month)+'/'+L0(st.Day);
end;
// Proposed function for %TIMESTAMP%
function GetTimestampStr: String;
begin
GetTimestampStr :=
IntToStr(Round(TimeStampToMSecs(DateTimeToTimeStamp(Now))));
end;
Denis
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel