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;
  • 相关阅读:
    数字游戏(划分型)
    统计单词个数(划分型)
    数的划分(划分型)
    乘积最大(划分型)
    codevs 3152 装箱问题3
    洛谷 p2530 化工场装箱员(资源型)
    金明的预算方案(分组背包)
    洛谷 p2066 机器分配(资源型)
    上升子序列问题
    网络流
  • 原文地址:https://www.cnblogs.com/Snowfun/p/2088742.html
Copyright © 2011-2022 走看看