|
@@ -541,6 +541,7 @@ type
|
|
property UnixTime: Int64 read GetUnixTime;
|
|
property UnixTime: Int64 read GetUnixTime;
|
|
property TotalSeconds: Int64 read GetTotalSecounds;
|
|
property TotalSeconds: Int64 read GetTotalSecounds;
|
|
function ToString(const aFormatStr: string = ''): string; inline;
|
|
function ToString(const aFormatStr: string = ''): string; inline;
|
|
|
|
+ function Format(const aFormatStr: string) : string;
|
|
function StartOfYear: TDateTime; inline;
|
|
function StartOfYear: TDateTime; inline;
|
|
function EndOfYear: TDateTime; inline;
|
|
function EndOfYear: TDateTime; inline;
|
|
function StartOfMonth: TDateTime; inline;
|
|
function StartOfMonth: TDateTime; inline;
|
|
@@ -3490,6 +3491,12 @@ begin
|
|
Result := StartOfTheYear(Self);
|
|
Result := StartOfTheYear(Self);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function TDateTimeHelper.Format(const aFormatStr: string) : string;
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ Result:=FormatDateTime(aFormatStr, Self);
|
|
|
|
+end;
|
|
|
|
+
|
|
function TDateTimeHelper.ToString(const aFormatStr: string): string;
|
|
function TDateTimeHelper.ToString(const aFormatStr: string): string;
|
|
begin
|
|
begin
|
|
if aFormatStr = '' then
|
|
if aFormatStr = '' then
|