yearmonthday/data.cs

(开头部分) 20KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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

namespace yearmonthday
{
    public class data
    {

        #region 年份,返回ArrayList类型
        //年份
        public ArrayList year()
        {
            ArrayList arraylist = new ArrayList(210);
            for (int i = 1902; i < 2100; i++)
            {

                arraylist.Add(i);
            }
            return arraylist;
        }
        #endregion

        #region 公历月份,返回ArrayList类型
        //月份
        public ArrayList month(int year)
        {
            ArrayList arraylist = new ArrayList();
            for (int i = 1; i <= 12; i++)
            {
                arraylist.Add(i);
            }
            return arraylist;
        }
        #endregion

        #region 农历月,返回ArrayList类型
        public ArrayList month1(int year)
        {
            
            ArrayList arraylist = new ArrayList();
            ChineseLunisolarCalendar calendar = new ChineseLunisolarCalendar();
            int leapmonth = calendar.GetLeapMonth(year);
            if (leapmonth > 0)
            {
                for (int i = 1; i <= leapmonth; i++)
                {
                    arraylist.Add(i);
                }
                for (int i = leapmonth; i < calendar.GetMonthsInYear(year); i++)
                {
                    arraylist.Add(i);
                }
            }
            else
            {
                for (int i = 1; i <= calendar.GetMonthsInYear(year); i++)
                {
后面还有 531 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。