Created
January 8, 2020 22:40
-
-
Save eklipse2k8/68a99360928abcdf2189f55732015165 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Return size of regional setting | |
int size = GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, nullptr, 0); | |
// Store regional setting into language array for DateTimeFormatter | |
wchar_t* locale = new wchar_t[size]; | |
size = GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, locale, size); | |
DateTimeFormatter weekFormatter(L"dayofweek.full", winrt::single_threaded_vector<hstring>({ locale })); | |
delete locale; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment