mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 22:38:57 +02:00
LazUtils: Support time formatting with 12-hour clock on Windows. Issue #39977, patch by foxpas.
This commit is contained in:
parent
e763fa23ce
commit
4c6414f837
@ -520,9 +520,14 @@ begin
|
|||||||
HF:='h'
|
HF:='h'
|
||||||
else
|
else
|
||||||
HF:='hh';
|
HF:='hh';
|
||||||
// No support for 12 hour stuff at the moment...
|
|
||||||
ShortTimeFormat := HF+':nn';
|
ShortTimeFormat := HF+':nn';
|
||||||
LongTimeFormat := HF + ':nn:ss';
|
LongTimeFormat := HF + ':nn:ss';
|
||||||
|
{ 12-hour system support }
|
||||||
|
if GetLocaleStr(LID, LOCALE_ITIME, '1') = '0' then
|
||||||
|
begin
|
||||||
|
LongTimeFormat := LongTimeFormat + ' AMPM';
|
||||||
|
ShortTimeFormat := ShortTimeFormat + ' AMPM';
|
||||||
|
end;
|
||||||
{ Currency stuff }
|
{ Currency stuff }
|
||||||
CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, '');
|
CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, '');
|
||||||
CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);
|
CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user