日期:2014-05-17  浏览次数:20839 次

C#.NET输入一个日期,要求输出农历求解
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
  protected void Page_Load(object sender, EventArgs e)
  {

  }
  protected void btnok_Click(object sender, EventArgs e)
  {
  Session["year"] = year.Text;
  int y = Convert.ToInt32(Session["year"]);
  if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0)
  {
  Response.Write(Session["year"] + "是闰年");
  }
  else
  {
  Response.Write(Session["year"] + "不是闰年");
  }


   
  }
}
把农历的写进去要怎写啊?

------解决方案--------------------
http://blog.csdn.net/zhoufoxcn/article/details/1896258