知道农历如何转换为阳历,有这方面的函数吗? 知道农历如何转换为阳历,有这方面的函数吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ....好变态的需求关注ingup http://www.cnblogs.com/donnet/articles/1144768.html看看这个 MARK我写了一个农历转阳历的DELPHI单元,是利用别人的阳历转农历的单元改写的.思路就是用他们的逆转换.只要知道一点就很清楚了:阳历肯定在农历之后.稍后写到博客里面去. 这个类: System.Globalization.ChineseLunisolarCalendar ChineseLunisolarCalendar 类...多看看MSDN...System.Globalization.ChineseLunisolarCalendar celender = new System.Globalization.ChineseLunisolarCalendar();Console.WriteLine("明年春节是{0}", celender.ToDateTime(2009, 1, 1, 0, 0, 0, 0).ToLongDateString()); 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; } }} .net中有先成的类就好了,收藏下,不过还是贴贴自己的算法好了:http://blog.csdn.net/much0726/archive/2008/12/05/3454108.aspx 两个Listview 行的拖动 ajax如何实现网页无刷新聊天 关于JOSN返回集合数据处理问题 隐藏控件与Button按钮的不同 一个极其简单的问题 关于ie7和火狐的2个问题 我在Word中复制一段很长文字插入数据库就不完整了是什么问题? 高分求教WebService传参数问题!! 一个类的问题没有明白 很容易回答的问题!就地给分! 如何将SQL2005中的数据导入到SQL2000中? 初学net的几点疑惑!
关注ing
up
看看这个
我写了一个农历转阳历的DELPHI单元,是利用别人的阳历转农历的单元改写的.
思路就是用他们的逆转换.只要知道一点就很清楚了:阳历肯定在农历之后.
稍后写到博客里面去.
这个类: System.Globalization.ChineseLunisolarCalendar
Console.WriteLine("明年春节是{0}", celender.ToDateTime(2009, 1, 1, 0, 0, 0, 0).ToLongDateString());
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;
}
}
}
http://blog.csdn.net/much0726/archive/2008/12/05/3454108.aspx