如何将Persiancalender转换为GregorianCalendar [英] How to convert Persiancalender to GregorianCalendar
本文介绍了如何将Persiancalender转换为GregorianCalendar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友们,
我写了一个代码将Persiancalender转换成GregorianCalendar,但我找不到为什么它不能真正起作用。
这是我的代码:
Hi friends,
I've written a code to convert Persiancalender to GregorianCalendar, but I couldn't found Why it doesn't work truly.
This is my code:
public static void PerasianCalender(DateTime birth)
{
GregorianCalendar gCalender = new GregorianCalendar();
DateTime oldDate = Convert.ToDateTime(gCalender.GetYear(birth) + "/" + gCalender.GetMonth(birth) + "/" + gCalender.GetDayOfMonth(birth));
Console.WriteLine(oldDate);
}
推荐答案
没有代码难以帮助。
对于您的代码,您是否与您的朋友Google搜索文章。我发现了这个讨论:
http://stackoverflow.com / questions / 11222427 / convert-date-from-persian-to-gregorian [ ^ ]可以帮助你。
祝你好运。
Hi,
Without code difficult to help.
For your code, do you search article with yur friend Google. I found this discussion:
http://stackoverflow.com/questions/11222427/convert-date-from-persian-to-gregorian[^] that can help you.
Best regards.
这篇关于如何将Persiancalender转换为GregorianCalendar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文