How to use correct regional format (date & time) of Windows Phone 8.1

牧云@^-^@ 提交于 2019-12-11 02:53:58

问题


In WP8.1 region settings, one can set a country/region and a regional format. In my case I have United States as the country/region and German (Germany) as the regional format because of Cortana.

However, the time picker as well as the date picker use 12hrs AM/PM format and the US date format mm-dd-yyyy.

I can't find any property which tells me the regional format that's visible in the settings dialog of WP8.1.

Is there any localization/globalization feature of Windows Phone Store apps, that I am missing? How can I get the exact time/date output that's printed in the region settings dialog in my own app, without letting the user select the date/time format itself again?


回答1:


You can take a look at the Windows.Globalization.DateTimeFormatting namespace on how to get specific formatting date masks.

Also, take a look at the Windows.Globalization(http://msdn.microsoft.com/en-us/library/windows/apps/windows.globalization.aspx) namespace



来源:https://stackoverflow.com/questions/25165215/how-to-use-correct-regional-format-date-time-of-windows-phone-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!