0

Hi all I need to convert the monthly calendar in c# forms to persian calendar. Any code for this please.I tried in google all have the code for converting todays date but not the entire calendar. please help

KF2
  • 9,887
  • 8
  • 44
  • 77
Manoj Chowdary
  • 97
  • 1
  • 3
  • 15

2 Answers2

0

For Convert Specific date to Persian use:

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);

And for Persian calender Follow this link and complete Persian calendar Asp.net Here

Updated:

Persian Calender Ui for Winform application

KF2
  • 9,887
  • 8
  • 44
  • 77
  • I want UI type persian calendar in my form this is showing only date in console window.thanks for the reply – Manoj Chowdary Nov 22 '12 at 17:44
  • CultureInfo info = new CultureInfo(“fa-Ir”); //set Persian option to specified culture PersianCultureHelper.SetPersianOptions(info); showing error while using – Manoj Chowdary Nov 22 '12 at 17:54
0

their is PersianCalendar Class read msdn http://msdn.microsoft.com/en-us/library/system.globalization.persiancalendar.aspx