I want to convert a date to the user set long date format. The Current Culture is en-US, but the user is able to set a long date format of his/her choice in Control panel -> Region -> Long Date.
In this case, here I set the Format to Hungarian, and selected the yyyy. MMMM d. format (keeping the Current Culture in en-US).
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.FullDateTimePattern returns an incorrect pattern.
So does the Windows.Globalization API.
In my Package.appxmanifest:
<Resources>
<Resource Language="x-generate" />
</Resources>
Anyone knows how to get the date format from control panel -> region -> long date?
Unfortunately, the UWP API's don't expose the Regional Settings; having said that I did find a working solution a while back, though I haven't tested it with Creators Update so can't confirm if it still works!
Update: I've found a non-hacky way of doing this, using the GetLocaleInfoEx Win32 API.