Now i am working with Hijri dates and trying to convert them to Gregorian dates using the following code :
string HijriDate; string[] allFormats ={\"yyyy
Max Value of a days in a month can be calculated by DateTime.DaysInMonth(year, month)
DateTime.DaysInMonth(year, month)
and use it this way
int result = DateTime.DaysInMonth(2012, 2); // returns 29 being a leap year
but
int result = DateTime.DaysInMonth(2011, 2) // returns 28 being a non-leap year