dati.inc: tabs 2 spaces and whitespaces formatting fix. no functional changes

git-svn-id: trunk@47808 -
This commit is contained in:
Károly Balogh 2020-12-18 11:55:21 +00:00
parent 80f87edffd
commit 4b3fee38a5

View File

@ -1089,8 +1089,8 @@ var
end ; end ;
'/': StoreStr(@FormatSettings.DateSeparator, 1); '/': StoreStr(@FormatSettings.DateSeparator, 1);
':': StoreStr(@FormatSettings.TimeSeparator, 1); ':': StoreStr(@FormatSettings.TimeSeparator, 1);
'[': if (fdoInterval in Options) then isInterval := true else StoreStr(FormatCurrent, 1); '[': if (fdoInterval in Options) then isInterval := true else StoreStr(FormatCurrent, 1);
']': if (fdoInterval in Options) then isInterval := false else StoreStr(FormatCurrent, 1); ']': if (fdoInterval in Options) then isInterval := false else StoreStr(FormatCurrent, 1);
' ', 'C', 'D', 'H', 'M', 'N', 'S', 'T', 'Y', 'Z', 'F' {$IFDEF MSWindows}, 'G', 'E'{$ENDIF MSWindows} : ' ', 'C', 'D', 'H', 'M', 'N', 'S', 'T', 'Y', 'Z', 'F' {$IFDEF MSWindows}, 'G', 'E'{$ENDIF MSWindows} :
begin begin
while (P < FormatEnd) and (UpCase(P^) = Token) do while (P < FormatEnd) and (UpCase(P^) = Token) do
@ -1105,9 +1105,9 @@ var
StoreInt(Year mod 100, 2); StoreInt(Year mod 100, 2);
end; end;
'M': begin 'M': begin
if isInterval and ((prevlasttoken = 'H') or TimeFlag) then if isInterval and ((prevlasttoken = 'H') or TimeFlag) then
StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0) StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0)
else else
if (lastformattoken = 'H') or TimeFlag then if (lastformattoken = 'H') or TimeFlag then
begin begin
if Count = 1 then if Count = 1 then
@ -1138,10 +1138,10 @@ var
end ; end ;
end ; end ;
'H': 'H':
if isInterval then if isInterval then
StoreInt(Hour + trunc(abs(DateTime))*24, 0) StoreInt(Hour + trunc(abs(DateTime))*24, 0)
else else
if Clock12 then if Clock12 then
begin begin
tmp := hour mod 12; tmp := hour mod 12;
if tmp=0 then tmp:=12; if tmp=0 then tmp:=12;
@ -1152,32 +1152,32 @@ var
end end
else begin else begin
if Count = 1 then if Count = 1 then
StoreInt(Hour, 0) StoreInt(Hour, 0)
else else
StoreInt(Hour, 2); StoreInt(Hour, 2);
end; end;
'N': if isInterval then 'N': if isInterval then
StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0) StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0)
else else
if Count = 1 then if Count = 1 then
StoreInt(Minute, 0) StoreInt(Minute, 0)
else else
StoreInt(Minute, 2); StoreInt(Minute, 2);
'S': if isInterval then 'S': if isInterval then
StoreInt(Second + (Minute + (Hour + trunc(abs(DateTime))*24)*60)*60, 0) StoreInt(Second + (Minute + (Hour + trunc(abs(DateTime))*24)*60)*60, 0)
else else
if Count = 1 then if Count = 1 then
StoreInt(Second, 0) StoreInt(Second, 0)
else else
StoreInt(Second, 2); StoreInt(Second, 2);
'Z': if Count = 1 then 'Z': if Count = 1 then
StoreInt(MilliSecond, 0) StoreInt(MilliSecond, 0)
else else
StoreInt(MilliSecond, 3); StoreInt(MilliSecond, 3);
'T': if Count = 1 then 'T': if Count = 1 then
StoreFormat(FormatSettings.ShortTimeFormat, Nesting+1, True) StoreFormat(FormatSettings.ShortTimeFormat, Nesting+1, True)
else else
StoreFormat(FormatSettings.LongTimeFormat, Nesting+1, True); StoreFormat(FormatSettings.LongTimeFormat, Nesting+1, True);
'C': begin 'C': begin
StoreFormat(FormatSettings.ShortDateFormat, Nesting+1, False); StoreFormat(FormatSettings.ShortDateFormat, Nesting+1, False);
if (Hour<>0) or (Minute<>0) or (Second<>0) then if (Hour<>0) or (Minute<>0) or (Second<>0) then
@ -1203,7 +1203,7 @@ var
Count := P - FormatCurrent; Count := P - FormatCurrent;
StoreString(ConvertEraYearString(Count,Year,Month,Day)); StoreString(ConvertEraYearString(Count,Year,Month,Day));
end; end;
prevlasttoken := lastformattoken; prevlasttoken := lastformattoken;
lastformattoken:=token; lastformattoken:=token;
end; end;
'G': 'G':
@ -1217,12 +1217,12 @@ var
Count := P - FormatCurrent; Count := P - FormatCurrent;
StoreString(ConvertEraString(Count,Year,Month,Day)); StoreString(ConvertEraString(Count,Year,Month,Day));
end; end;
prevlasttoken := lastformattoken; prevlasttoken := lastformattoken;
lastformattoken:=token; lastformattoken:=token;
end; end;
{$endif win32 or win64} {$endif win32 or win64}
end; end;
prevlasttoken := lastformattoken; prevlasttoken := lastformattoken;
lastformattoken := token; lastformattoken := token;
end; end;
else else