Browse Source

Merged revisions 8288 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r8288 | Almindor | 2007-08-16 11:58:35 +0200 (do, 16 aug 2007) | 2 lines

* fix bug #9438

........

git-svn-id: branches/fixes_2_2@8309 -

joost 18 years ago
parent
commit
ddc7a271ee
1 changed files with 9 additions and 2 deletions
  1. 9 2
      rtl/objpas/sysutils/dati.inc

+ 9 - 2
rtl/objpas/sysutils/dati.inc

@@ -371,9 +371,16 @@ begin
   n := 0;
   n := 0;
   for i := 1 to length(s) do
   for i := 1 to length(s) do
    begin
    begin
-     if (s[i] in ['0'..'9']) then
+     if s[i] in ['0'..'9'] then
       s1 := s1 + s[i];
       s1 := s1 + s[i];
-     if (s[i] in [dateseparator,' ']) or ((i = length(s)) and (s[i] in ['0'..'9'])) then
+
+     { space can be part of the shortdateformat, and is defaultly in slovak
+       windows, therefor it shouldn't be taken as separator (unless so specified)
+       and ignored }
+     if (DateSeparator <> ' ') and (s[i] = ' ') then
+       Continue;
+
+     if (s[i] = dateseparator) or ((i = length(s)) and (s[i] in ['0'..'9'])) then
       begin
       begin
         inc(n);
         inc(n);
         if n>3 then
         if n>3 then