c# - String.format() DateTime 具有阿拉伯文化

标签 c# datetime cultureinfo string.format

检查下面的代码片段,

namespace TestDateConvertion
{
    class Program
    {
        static void Main(string[] args)
        {
            DateTime testValue = new DateTime(2013, 12, 15, 15, 33, 44);

            CultureInfo culture = new CultureInfo("ar-SA");
            string stringValue = string.Format(culture, "{0:d} {0:HH:mm:ss}", testValue);
            Console.WriteLine(stringValue);
            Console.ReadLine();
        }
    }
}

输出为

22/02/35 15:33:44

我不明白这是怎么可能的。 35 在那里输出什么

最佳答案

在回历中是 13/12/2015,35 在回历中表示 1435,这是沙特阿拉伯的默认日期格式。

关于c# - String.format() DateTime 具有阿拉伯文化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17721858/

相关文章:

c# - 目录监控

c# - websocket 无法访问本地网络客户端服务

Python Pandas 日期时间索引

python - 检测变量是否为日期时间对象

c# - C#中的字符串排序问题

c# - Xamarin 安卓 C# SQLite

javascript - 将 ASP.NET Webforms OnClick 事件限制为一次

c# - 默认参数必须是编译时常量

c# - 文化信息名称

javascript - 给定文化的文化特定货币