2012-11-22 41 views
0

大家好我需要将c#表单中的每月日历转换为波斯日历。 任何代码请this.I在谷歌尝试所有的代码转换今天的日期,但不是整个日历。请帮助如何将c#中的每月日历转换为持久日历

+0

我希望这个线程将帮助您:http://stackoverflow.com/questions/11222427/convert-date-from-persian-to-gregorian – Tanel

+0

我要完整的日历不是单日期 –

回答

0

对于转换的具体日期波斯使用:

System.Globalization.PersianCalendar p = new System.Globalization.PersianCalendar(); 
DateTime date = DateTime.Today; 
int year = p.GetYear(date); 
int month = p.GetMonth(date); 
int day = p.GetDayOfMonth(date); 
DateTime d1 = new DateTime(year, month, day); 

而且波斯压延按照此link完整的波斯历法Asp.netHere

更新时间:

Persian Calender Ui for Winform application

+0

我想在我的窗体中显示UI类型波斯日历,这是在控制台窗口中显示的唯一日期。回复 –

+0

@Manoj Chowdary:回复更新按照更新后的链接 – KF2

+0

CultureInfo info = new CultureInfo(“fa-Ir”); //设置指定文化的波斯语选项 PersianCultureHelper.SetPersianOptions(info);显示错误,而使用 –