Created
March 2, 2022 17:36
-
-
Save xavierlopezpujol/1b450077fee9d34c9691b8906edff87c to your computer and use it in GitHub Desktop.
Test DateToISO8601
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program TestDateToISO8601; | |
{$APPTYPE CONSOLE} | |
{$R *.res} | |
uses | |
System.SysUtils, | |
System.DateUtils; | |
begin | |
assert(Datetoiso8601(EncodeDate(2022,3,2),True)='2022-03-02T00:00:00.000Z'); | |
assert(Datetoiso8601(0.0,True)='1899-12-30T00:00:00.000Z'); | |
assert(Datetoiso8601(0,False)='1899-12-30T00:00:00.000+01:00'); | |
assert(Datetoiso8601(EncodeDate(1899,12,30),True)='1899-12-30T00:00:00.000Z'); | |
assert(Datetoiso8601(EncodeDate(1899,12,30),False)='1899-12-30T00:00:00.000+01:00'); | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment