Calendar OutofRange Problem
I have a problem with PersianDateCalendar class and ArgumentOutOfRangEexception... here is my code :
DateTime get = Convert.ToDateTime(TextBox1.Text);
PersianCalendar p = new PersianCalendar();
DateTime set = new DateTime(p.GetYear(get), p.GetMonth(get), p.GetDayOfMonth(get));
for some dates it's working and for some it's not working!!!! for example when I write 7/22/2006 or 5/20/2006 it throw an ArgumentOutOfRangeException... I know what is this Exception and what it means.. but the problem is it's not out of range in real world!!! is it??? Have I done something wrong?? or is it a bug in class?
The exception throw at DateTime set...
what can I do now?
thanks in advance