Here is a thing, I want to share with you.
To find a workaround is easy, but this is too strange to just work around.
All starts with a line in an iCal or *.ics
Who is not familiar with it: This means the 11th of March in the year 1601 at time 2 o'clock.
So a date-typo, ok
We reduce it to
16010311
which is in the year 1601.
This I wanted to skip by a validity check, but surprisingly it passed.
I wrote:
valid:=TryStrToDate(s, myDate);
Valid was true and the date -109105.
A reverse check
ShowMessage(DateToStr(myDate));
gave me the correct date in the year 1601.
WOW!
The strange thing starts, when I add the value to a Listbox
I added it by
ListBox1.Items.Add(DateToStr(newsA
.datum)
The value newsA.datum is negative, and contains the 17the century-date.
However the displayed Listbox contains
30.12.1899
instead, what shall be zero.
Awaiting any comments.