EDN Admin
Well-known member
Hi All,
I am trying to convert Gregorian calendar date value to Hijri one.
The test date is 10th May, 2013. The result is "01/07/1434" not "30/06/1434". I am confused...
My test code is: private static void Test(){
DateTime dt;
System.Globalization.DateTimeFormatInfo HijriDTFI;
try{
dt = Convert.ToDateTime("5/10/2013");
HijriDTFI = new System.Globalization.CultureInfo("ar-EG", false).DateTimeFormat;
HijriDTFI.Calendar = new System.Globalization.HijriCalendar();
HijriDTFI.ShortDatePattern = "dd/MM/yyyy";
MessageBox.Show(dt.Date.ToString("f", HijriDTFI));
} catch (Exception e){
MessageBox.Show(e.ToString());
}
}
Is it a defect in Microsoft??
Regards,
James
James
View the full article
I am trying to convert Gregorian calendar date value to Hijri one.
The test date is 10th May, 2013. The result is "01/07/1434" not "30/06/1434". I am confused...
My test code is: private static void Test(){
DateTime dt;
System.Globalization.DateTimeFormatInfo HijriDTFI;
try{
dt = Convert.ToDateTime("5/10/2013");
HijriDTFI = new System.Globalization.CultureInfo("ar-EG", false).DateTimeFormat;
HijriDTFI.Calendar = new System.Globalization.HijriCalendar();
HijriDTFI.ShortDatePattern = "dd/MM/yyyy";
MessageBox.Show(dt.Date.ToString("f", HijriDTFI));
} catch (Exception e){
MessageBox.Show(e.ToString());
}
}
Is it a defect in Microsoft??
Regards,
James
James
View the full article