开发者

How to get the Time format for all the regionals

In Control Panel-> Regional and language options-> Regional Options-> Standard and formats, there is the list of all the regionals and by clicking the "Customize" button, the us开发者_C百科er can set the time format

My question is how to get the current and default time format for all the regionals programmelly?


You can list them through C# like this.

foreach(var cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
    Console.WriteLine("{0}: {1}",
                      cultureInfo.Name,
                      cultureInfo.IsNeutralCulture ? "-" : cultureInfo.DateTimeFormat.ShortDatePattern);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜