PDFium Delphi Component Docs

DecodeDate Yöntem

Component: TPdf  ·  Unit: PDFium
PDF date biçimini DateTime ve DateTimeOffset'e çevirir. DateTimeOffset, Eşgüdümlü Evrensel Zamana (UTC) göre tarih/saat konumunu (dakika cinsinden) içerir

Syntax

function DecodeDate(const Value: string; out DateTime: TDateTime; out DateTimeOffset: Integer): Boolean;

Valuestring. PDF date string in the PDF date format: D:YYYYMMDDHHmmSSOHH'mm' (e.g. "D:20240515120000+08'00'").
DateTimeTDateTime. Output parameter that receives the decoded date and time value.
DateTimeOffsetInteger. Çıktı parametresi, UTC konumunu dakika cinsinden alır. Pozitif değerler UTC'nin doğusunu, negatif değerler batısını gösterir

Return Value

Döndürür: True if Value was successfully parsed as a valid PDF date string. Döndürür: False dize boşsa, bozuksa ya da PDF tarih biçimine uymuyorsa.

Description

DecodeDate, PDFium unit'inde unit düzeyinde bir global fonksiyondur. Bir PDF tarih stringini ayrıştırır ve UTC saat dilimi konumuyla (dakika cinsinden) birlikte bir Delphi TDateTime değerine çevirir

PDF dokümanları tarihleri D:YYYYMMDDHHmmSSOHH'mm' biçiminde saklar; burada O UTC ile ilişkiyi gösterir (+, - veya Z). CreationDate ve ModifiedDate gibi property'lerin döndürdüğü ham stringleri çözmek için bu fonksiyonu kullanın

DateTimeOffset out parametresi işaretli UTC konumunu dakika cinsinden içerir (örneğin UTC+8 için 480, UTC-5 için -300). DateTime out parametresi, PDF stringinde kodlandığı hâliyle yerel saate ayarlanır; UTC'ye çevrilmez

Example

var
  DT: TDateTime;
  Offset: Integer;
begin
  if DecodeDate(Pdf.CreationDate, DT, Offset) then
  begin
    ShowMessage('Created: ' + DateTimeToStr(DT));
    ShowMessage('UTC offset (minutes): ' + IntToStr(Offset));
  end;
end;

See Also

CreationDate, ModifiedDate