Get user specified long date format in UWP

前端 未结 1 725
自闭症患者
自闭症患者 2021-01-27 22:47

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 -> Reg

1条回答
  •  一生所求
    2021-01-27 23:20

    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.

    0 讨论(0)
提交回复
热议问题