On Sat, 10 May 2014, Bart wrote:
Hi, I'm using fpc 2.6.4. While i was playing a bit with issue http://bugs.freepascal.org/view.php?id=20522 I stmbled upon unexpected behaviour of StrToDate function. StrToDate('6-12-2011 ') (note the space at the end) actually gives me 6-12-2014.
That is because the last part is not 'correct' (contains trailing garbage) and then the strtodate assumes the year is missing, and substitutes the current year,
as if you had specified 6-12. It still functions like this in trunk. A simple trim() will solve this, presumably. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal