C # realizes the code sharing of Chinese lunar calendar operation class
This article mainly explains "C# realizes the code sharing of Chinese lunar calendar operation class". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "C# to achieve the Chinese lunar calendar operation class code sharing" bar!
Private static int leapDays (int y) {if (leapMonth (y)! = 0) {if ((lunarInfo [y-1900] & 0x10000)! = 0) return 30; else return 29;} else return 0 } private static int leapMonth (int y) {return (int) (lunarInfo [y-1900] & 0xf);} private static int monthDays (int y, int m) {if ((lunarInfo [y-1900] & (0x10000 > > m)) = 0) return 29; else return 30 } private static String AnimalsYear (int y) {return Animals [(y-4)% 12];} private static String cyclicalm (int num) {return (Gan [num% 10] + Zhi [num% 12]);} private static String cyclical (int y) {int num = y-1900 + 36; return (cyclicalm (num)) } at this point, I believe you have a deeper understanding of "C# to realize the code sharing of Chinese lunar calendar operation class". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!