瀏覽代碼

* fix bug #9438

git-svn-id: trunk@8288 -
Almindor 18 年之前
父節點
當前提交
1e4dd0685a
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      rtl/objpas/sysutils/dati.inc

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

@@ -371,9 +371,16 @@ begin
   n := 0;
   for i := 1 to length(s) do
    begin
-     if (s[i] in ['0'..'9']) then
+     if s[i] in ['0'..'9'] then
       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
         inc(n);
         if n>3 then