zoukankan      html  css  js  c++  java
  • ChineseLunisolarCalendar

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Globalization;

    namespace EasyDotNet.Calendar
    {
        
    public class ABC
        {
            
    private int _year = 1990, _month = 1, _day = 1;
            
    private string[] dayName = new string[] {
                
    "初一","初二","初三","初四","初五","初六","初七","初八","初九","初十",
                
    "十一","十二","十三","十四","十五","十六","十七","十八","十九","二十",
                
    "廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"};


            
    private ChineseLunisolarCalendar clc = new ChineseLunisolarCalendar();   
            
    public ABC(DateTime dt)
            {
                _year 
    = clc.GetYear(dt);
                _month 
    = clc.GetMonth(dt);
                _day 
    = clc.GetDayOfMonth(dt);
            }

            
    private string _dayname;
            
    public string GetDayName { get { _dayname = dayName[_day - 1]; return _dayname; } }
            
        }
    }
     ABC aa = new ABC(DateTime.Now);
     txt1.Text 
    ="今日是農歷" +aa.GetDayName;
  • 相关阅读:
    shell命令执行过程
    shell中的引用
    ansible小结
    centos自动化安装镜像制作
    centos kickstart
    centos内核引导参数
    C# .NET 遍历Json 形成键值对
    强大的Winform Chart图表控件使用说明
    C#实现转换十六进制
    C# 批量登陆远程目录
  • 原文地址:https://www.cnblogs.com/Snowfun/p/2088742.html
Copyright © 2011-2022 走看看