知道农历如何转换为阳历,有这方面的函数吗?

解决方案 »

  1.   

    ....好变态的需求
    关注ing
    up
      

  2.   

    http://www.cnblogs.com/donnet/articles/1144768.html
    看看这个
      

  3.   

    MARK
    我写了一个农历转阳历的DELPHI单元,是利用别人的阳历转农历的单元改写的.
    思路就是用他们的逆转换.只要知道一点就很清楚了:阳历肯定在农历之后.
    稍后写到博客里面去.
      

  4.   


     这个类: System.Globalization.ChineseLunisolarCalendar
      

  5.   

    ChineseLunisolarCalendar 类...多看看MSDN...System.Globalization.ChineseLunisolarCalendar celender = new System.Globalization.ChineseLunisolarCalendar();
    Console.WriteLine("明年春节是{0}", celender.ToDateTime(2009, 1, 1, 0, 0, 0, 0).ToLongDateString());
      

  6.   

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Globalization;namespace WebApplication1
    {
        public partial class WebForm2 : System.Web.UI.Page
        {
            private ChineseLunisolarCalendar chineseDate = new ChineseLunisolarCalendar();        protected void Page_Load(object sender, EventArgs e)
            {        }        protected void Button1_Click(object sender, EventArgs e)
            {
                string Moon = chineseDate.GetYear(Convert.ToDateTime(this.txtSun.Text.Trim())).ToString() + "-" + chineseDate.GetMonth(Convert.ToDateTime(this.txtSun.Text.Trim())).ToString() + "-" + chineseDate.GetDayOfMonth(Convert.ToDateTime(this.txtSun.Text.Trim()));
                this.txtMoon.Text = Moon;
            }       
        }
    }
      

  7.   

    .net中有先成的类就好了,收藏下,不过还是贴贴自己的算法好了:
    http://blog.csdn.net/much0726/archive/2008/12/05/3454108.aspx