公历转农历函数
2012-01-11 13:26
337 查看
class Program { static void Main(string[] args) { System.Globalization.ChineseLunisolarCalendar chineseLunisolarCalendar = new System.Globalization.ChineseLunisolarCalendar(); DateTime date = DateTime.Now; int year = chineseLunisolarCalendar.GetYear(date); int month = chineseLunisolarCalendar.GetMonth(date); int day = chineseLunisolarCalendar.GetDayOfMonth(date); Console.WriteLine(string.Format("公历:{0} 农历:{1}", date.ToString("yyyy-MM-dd"), (year + "-" + month + "-" + day))); Console.Read(); } }
相关文章推荐
- delphi 公历转农历函数
- C# 阳历转阴历函数 公历转农历函数
- SQL Server公历转农历函数
- oracle农历转公历函数
- 公历转为农历的函数
- SQLServer公历转农历函数(1900年-2049年)
- 公历转换成农历的函数
- PHP 公历转农历函数
- SQLServer公历转农历函数(1900年-2049年)
- 农历 公历 互转函数(包括节气获取)
- SQLServer公历转农历函数(1900年-2049年)
- 公历转农历函数
- 常用函数集农历函数
- 阴阳日历转换 公历日期转农历 八字排日柱算法
- 公历转农历算法(C语言)
- PHP 实现公历日期与农历日期的互转换
- 根据农历时间计算公历时间
- PHP汉字拼音转换和公历农历转换
- 公历转农历C程序
- 阳历转农历的js函数