New Rfc3339DateTime function
git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@276 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
parent
0eda92b747
commit
1d96b0dfcd
16
synautil.pas
16
synautil.pas
@ -1,9 +1,9 @@
|
||||
{==============================================================================|
|
||||
| Project : Ararat Synapse | 004.015.007 |
|
||||
| Project : Ararat Synapse | 004.016.000 |
|
||||
|==============================================================================|
|
||||
| Content: support procedures and functions |
|
||||
|==============================================================================|
|
||||
| Copyright (c)1999-2017, Lukas Gebauer |
|
||||
| Copyright (c)1999-2023, Lukas Gebauer |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Redistribution and use in source and binary forms, with or without |
|
||||
@ -33,7 +33,7 @@
|
||||
| DAMAGE. |
|
||||
|==============================================================================|
|
||||
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
|
||||
| Portions created by Lukas Gebauer are Copyright (c) 1999-2017. |
|
||||
| Portions created by Lukas Gebauer are Copyright (c) 1999-2023. |
|
||||
| Portions created by Hernan Sanchez are Copyright (c) 2000. |
|
||||
| Portions created by Petr Fejfar are Copyright (c)2011-2012. |
|
||||
| All Rights Reserved. |
|
||||
@ -124,6 +124,9 @@ function TimeZone: string;
|
||||
'Fri, 15 Oct 1999 21:14:56 +0200')}
|
||||
function Rfc822DateTime(t: TDateTime): string;
|
||||
|
||||
{:Returns date and time in format defined in RFC-3339 in format "yyyy-mm-ddThh:nn:ss.zzz"}
|
||||
function Rfc3339DateTime(t: TDateTime): string;
|
||||
|
||||
{:Returns date and time in format defined in C compilers in format "mmm dd hh:nn:ss"}
|
||||
function CDateTime(t: TDateTime): string;
|
||||
|
||||
@ -491,6 +494,13 @@ end;
|
||||
|
||||
{==============================================================================}
|
||||
|
||||
function Rfc3339DateTime(t: TDateTime): string;
|
||||
begin
|
||||
Result := FormatDateTime('yyyy"-"mm"-"dd"T"hh":"nn":"ss"."zzz', t) + Timezone;
|
||||
end;
|
||||
|
||||
{==============================================================================}
|
||||
|
||||
function CDateTime(t: TDateTime): string;
|
||||
var
|
||||
wYear, wMonth, wDay: word;
|
||||
|
Loading…
x
Reference in New Issue
Block a user