Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Delphi's routines does nothing special - they just ask OS. Here is how to to it: <a href="http://msdn.microsoft.com/en-us/library/dd319114(VS.85).aspx" rel="nofollow noreferrer">Retrieving Time and Date Information</a>. I looked through MSDNs docs and found <a href="http://msdn.microsoft.com/en-us/library/dd373890(VS.85).aspx" rel="nofollow noreferrer">this</a>. </p> <p>Note, that there is no really such thing as "2 character day-name" or "3 character day-name" here. There are: native ("long" in Delphi), abbreviated ("short" in Delphi) or short (Vista and above, not present in Delphi) formats.</p> <p>For example, abbreviated name of the day of the week for Monday: Mon (3 chars, en-US), Пн (2 chars, ru-RU).</p> <p>So, you probably look for <a href="http://msdn.microsoft.com/en-us/library/dd373890(VS.85).aspx" rel="nofollow noreferrer">LOCALE_SSHORTESTDAYNAMEX</a> format (which is called "short" by MSDN and doesn't appear in Delphi), but it is availavle only on Vista and above.</p> <p>For example, the following code:</p> <pre><code>const LOCALE_SSHORTESTDAYNAME1 = $60; procedure TForm1.Button1Click(Sender: TObject); begin SetThreadLocale($409); ShowMessage( GetLocaleStr(GetThreadLocale, LOCALE_SSHORTESTDAYNAME1, '') + #13#10 + GetLocaleStr(GetThreadLocale, LOCALE_SABBREVDAYNAME1, '') ); end; </code></pre> <p>will show you:</p> <blockquote> <p>Mo</p> <p>Mon</p> </blockquote> <p>But doing this for Russian will output:</p> <blockquote> <p>Пн</p> <p>Пн</p> </blockquote> <p>Hope my edits make answer more clear ;)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload