1. Hierarchy
Object<----Calendar<----EastAsianLunisolarCalendar<-----ChineseLunisolarCalendar(Lunar)
2. Usage
1. The maximum and minimum date supported
cc =new (); s1=("");//02/19/1901 00:00:00 s2=("");//01/28/2101 23:59:59
2. Number of days in unit lunar calendar
cc =new (); s1=().ToString();//12, how many months are there in the year, 13 means there is a leap month in that year.s2=().ToString();//354, how many days are there in a years3=(,).ToString();//29 ,How many days are there in the month
3. Heavenly stems and earthly branches
cc =new (); s1=( ).ToString();//36, Heavenly Stems2=(36).ToString();//12,Earthly branches
4. Lunar Year, Month, Day
cc =new (); s1=().ToString();//;2019 s2=().ToString();//;5, Note: Its return value is 1-13. If there is a leap month in April of that year, April returns 4, and leap month returns 5.s3=().ToString();//;23
5. Leap year and leap month
cc =new (); s1=().ToString();//;False s2=().ToString();//;0,Notice:Indicates the leap month。If return5,Indicates leap4moon。
6. Display the capital month of the lunar calendar
string[] monthName = {"just", "two", "three", "Four", "five", "six", "seven", "eight", "Nine", "ten", "East", "Lar" }; cc = new (); int currentMonth = (); int leapMonth = (); string realMonth; if (currentMonth < leapMonth) realMonth = monthName[currentMonth]; else if (currentMonth == leapMonth) realMonth = "Leap" + monthName[currentMonth - 1]; else realMonth = monthName[currentMonth - 1]; s1 = ();//;five
This is all about this article about C# implementing Chinese calendar Calendar. I hope it will be helpful to everyone's learning and I hope everyone will support me more.