/ * * Lunar calendar, by aiyao at www.5dz.net * /
Using system;
Namespace yyay.web.webclass {
#Region Use Example // You can cancel this code to get an example result. . // public class mytest // {// // method one, use Lunardate class // public string motor_d1 () // {// datetime _d = DateTime.now; // Lunardate LD = New Lunardate (_d); // String result = ""; // result = "Dedicated Year:" LD.LunaryEar "/ R / N"; // Result = "Zodiac:" LD.Animal "/ R / N"; / / Result = "Month:" LD.Lunarmonth "/ r / n"; // Result = "Japan:" ld.lunarday "/ r / n"; // result = "Shanning:" LD.SOLARTERM "/ r / n"; // Result = "Digital Lunar Year:" ld.year "Month" LD.MONTH "Day" LD.DAY "/ R / N" ; //} /// // method 2, use LunardateClass class // public string mothed2 () // {// datetime _d = datetime.now; // lunardateClass LDC = New LunardateClass (_d) ; // string result = ""; // result = "Dedicated Year:" LDC.Lunaryear "/ R / N"; // Result = "Zodiac:" LDC.Animal "/ R / N "; // result =" Month: " LDC.Lunarmonth " / r / n "; // Result =" Japan: " LDC.Lunarday " / R / N "; // Result =" Shanning: " ldc.solarterm " / r / n "; // //ldc.lunardate Returns the Lunardate object. . // RESULT = "Digital Lunar Year:" LDC.Lunardate.year "Month" LDC.Lunardate.Month "Day" LDC.Lunardate.day "/ R / N"; // Return RESULT //} //} # endregion # Region Lunardate
public class LunarDateClass {private const ushort START_YEAR = 1901; private const ushort END_YEAR = 2050; private DateTime m_Date = DateTime.MinValue; private LunarDate m_LunarDate = null; private string m_LunarYear = "", m_LunarMonth = "", m_LunarDay = ""; private String m_animal = "" ", m_constellation =", m_solarterm = ""; ///
///
///
#Region LunardateClassData
///
///
///
///
/ / The number of twenty-four hollow calendars in the year is almost fixed, and the average distribution is distributed in 12 months / / January, September April May // Xiaoyan cold spring rain, the spring is clear, the Qingming Valley Yili Xia Xia Mang September 1, September 11, September, September, September, September, September, September, September, September, September, September, September, September, September September, September, September, September, September, September, September, September, September, September, September, September, September, September, Summer *********************************************************** ************ // The fierce has no determination law, so there is only a good memory, save space, so ... // ************* *********************************************************** ******************} // Data format Description: //, such as 1901 flying to //, January 8, April 8 July 8 September, September 11, December //6, 21, 4, 19, 6, 21, 5, 21, 6, 22, 6, 22, 8, 23, 8, 24, 8, 24, 8, 24 , 8, 23, 8, 22 // 9, 6, 11, 4, 9, 6, 10, 6, 9, 7, 9, 7, 7, 8, 7, 9, 7, 9, 7, 9, 7, 8, 7, 15 // The first line of data is the date of the monthly hollow, 15 minus the first holiday every month, and the second holiday will be reduced 15 to the second line // this month. The corresponding data is less than 16, stored in one byte, stores the first throttle data, the high position is stored // second hollow data, can be the following table private bote [] glunarholday =
{0x96, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1901 0x96, 0xA4, 0x96, 0x96, 0x97, 0x87, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1902 0x96, 0xa5, 0x87, 0x96, 0x87, 0x87, 0x79, 0x69, 0x69, 0x69, 0x78, 0x78, // 1903 0x86, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x78, 0x87, // 1904 0x96, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1905 0x96, 0xa4, 0x96, 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1906 0x96, 0xa5, 0x87, 0x96, 0x87, 0x87, 0x79, 0x69, 0x69, 0x69, 0x78, 0x78, // 1907 0x86, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1908 0x96, 0x97, 0x96, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1909 0x96, 0xA4, 0x96, 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1910 0x96, 0xa5, 0x87, 0x96, 0x87, 0x87, 0x79, 0x69, 0x69, 0x69, 0x78, 0x78, // 1911 0x86, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1912 0x95, 0xB4, 0x96, 0xA6, 0 X97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1913 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1914 0x96, 0xa5, 0x97, 0x96, 0x97, 0x87, 0x79, 0x79, 0x69, 0x69, 0x78, 0x78, // 1915 0x96, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1916 0x95, 0x96, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x87, // 1917 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x77 , // 1918 0x96, 0xa5, 0x97, 0x96, 0x97, 0x87, 0x79, 0x79, 0x69, 0x69, 0x78, 0x78, // 1919 0x96, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79 , 0x77, 0x87, // 1920 0x95, 0xB4, 0x96, 0xA5, 0x96, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x87, // 1921 0x96, 0x97, 0x96, 0xa6, 0x97, 0x97, 0x79,
0x79, 0x79, 0x69, 0x78, 0x77, // 1922 0x96, 0xA4, 0x96, 0x96, 0x97, 0x87, 0x79, 0x79, 0x69, 0x69, 0x78, 0x78, // 1923 0x96, 0xa5, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1924 0x95, 0x96, 0x96, 0xa5, 0x96, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x87, // 1925 0x96, 0xB4, 0x96, 0xA6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1926 0x96, 0xa4, 0x96, 0x96, 0x97, 0x87, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1927 0x96, 0xA5, 0x96, 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1928 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, / / 1929 0x96, 0xb4, 0x96, 0xa6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1930 0x96, 0xa4, 0x96, 0x96, 0x97, 0x87, 0x79, 0x79, 0x79, 0x69, 0x78 , 0x78, // 1931 0x96, 0xA5, 0x96, 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1932 0x95, 0x96, 0x97, 0x88, 0x78, 0x78 , 0x69, 0x78, 0x96, 0xb4, 0x96, 0xa6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77 , // 1934 0x96, 0xA4, 0x96, 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1935 0x96, 0xa5, 0x96, 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78 , 0x87, 0x87, // 1936 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1937 0X96, 0xB4, 0X96, 0XA6, 0x97, 0x97, 0x78, 0x79 , 0x79, 0x69, 0x78, 0x77, // 1938 0x96, 0xA4, 0x96, 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1939 0x96, 0xa5, 0x96, 0xa5, 0x96, 0x96 , 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1940 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1941 0x96, 0xB4, 0x96, 0xA6 , 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1942 0x96, 0xa4, 0x96, 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78, 0x78, // 1943 0x96,
0xA5, 0x96, 0xA5, 0xA6, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1944 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, / / 1945 0x95, 0xB4, 0x96, 0xA6, 0x97, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x77, // 1946 0x96, 0x97, 0x97, 0x79, 0x79, 0x79, 0x69, 0x78 , 0x78, // 1947 0x96, 0xa5, 0xa6, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 1948 0xa5, 0x96, 0x97, 0x88, 0x79, 0x78 , 0x79, 0x77, 0x87, // 1949 0x95, 0x96, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x77, // 1950 0x96, 0xb4, 0x96, 0xa6, 0x97, 0x97, 0x79 , 0x79, 0x79, 0x69, 0x78, 0x78, // 1951 0x96, 0xa5, 0xa6, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 1952 0xa5, 0xB4, 0x96, 0xa5, 0x96 , 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1953 0x95, 0x96, 0x96, 0xa5, 0x96, 0x97, 0x78, 0x79, 0x78, 0x68, 0x78, 0x87, // 1954 0x96, 0xB4, 0x96 , 0xA6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1955 0x96, 0xa5, 0xa5, 0xa5, 0xa6, 0x96 , 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 1956 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1957 0x95, 0xB4, 0x96, 0xa5 , 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1958 0x96, 0x7, 0x96, 0xa6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1959 0x96, 0xa4 , 0xa5, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 1960 0xa5, 0xB4, 0x96, 0xA5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1961 0x96, 0x5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1962 0x96, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1963 0x96, 0xa4, 0xa5, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 1964 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78,
0x78, 0x87, 0x87, // 1965 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1966 0x96, 0x97, 0x96, 0xa6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1967 0x96, 0xa4, 0xa5, 0x88, 0xa6, 0xa6, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 1968 0XA5, 0X96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1969 0x95, 0x96, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1970 0x96, 0xB4, 0x96, 0xA6, 0x97, 0x97, 0x78, 0x79, 0x79, 0x69, 0x78, 0x77, // 1971 0X96, 0XA4, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0X87, / / 1972 0XA5, 0xB5, 0x96, 0xA5, 0xA6, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1973 0x95, 0x96, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, / / 1974 0x96, 0xB4, 0x96, 0xA6, 0x97, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x77, // 1975 0x96, 0xa4, 0xa5, 0x88, 0xa6, 0xa6, 0x88, 0x89, 0x88, 0x78, 0x87 , 0x87, // 1976 0xa5, 0xB4, 0x96, 0xA5, 0x96, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 1977 0 X95, 0xB4, 0x96, 0xA5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x78, 0x87, // 1978 0x96, 0x96, 0x97, 0x78, 0x79, 0x78, 0x69, 0x78, 0x77 , // 1979 0x96, 0xA4, 0xA5, 0x888, 0x88, 0x88, 0x78, 0x87, 0x87, // 1980 0xa5, 0xa6, 0x96, 0x88, 0x888, 0x78, 0x78 , 0x77, 0x87, // 1981 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1982 0x95, 0xB4, 0x96, 0xa5, 0x96, 0x97, 0x78, 0x79 , 0x78, 0x69, 0x78, 0x77, // 1983 0x96, 0xa6, 0xa6, 0x87, 0x88, 0x88, 0x78, 0x87, 0x87, // 1984 0xa5, 0xa6, 0x96 , 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 1985 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 1986 0x95, 0xB4, 0x96,
0xA5, 0x96, 0x97, 0x88, 0x79, 0x78, 0x69, 0x78, 0x87, // 1987 0x96, 0xa6, 0xa6, 0x87, 0x88, 0x88, 0x78, 0x87, 0x86, // 1988 0xa5, 0xB4, 0xA5, 0xA5, 0xA6, 0x96, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 1989 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, / / 1990 0x95, 0xb4, 0x96, 0xa5, 0x86, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 1991 0x96, 0xA6, 0xa5, 0x87, 0x888, 0x88, 0x78, 0x87 , 0x86, // 1992 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 1993 0xa5, 0x96, 0x96, 0x888, 0x78, 0x78 , 0x78, 0x87, 0x87, // 1994 0x95, 0x96, 0x97, 0x88, 0x76, 0x78, 0x69, 0x78, 0x87, // 1995 0x96, 0xa6, 0xa5, 0x, 0xa6, 0xa6, 0x87 , 0x88, 0x88, 0x78, 0x87, 0x86, // 1996 0XA5, 0XA6, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78, 0X87, 0x87, // 1997 0xa5, 0xb4, 0x96, 0xa5, 0x96 , 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 1998 0x95, 0xB4, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78 , 0x78, 0x69, 0x78, 0x87, // 1999 0x96, 0xa6, 0xa6, 0x87, 0x88, 0x88, 0x78, 0x87, 0x86, // 2000 0xa5, 0x, 0xa5, 0xa5, 0xa6, 0xa6 , 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 2001 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 2002 0x95, 0xb4, 0x96, 0xa5 , 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 2003 0x96, 0xa6, 0xa5, 0x87, 0x88, 0x88, 0x78, 0x87, 0x86, // 2004 0XA5, 0XB3 , 0xa5, 0xa5, 0xa6, 0xa6, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 2005 0xa5, 0xa6, 0x96, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2006 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x69, 0x78, 0x87, // 2007 0x96, 0xa6, 0xa6, 0x87, 0x88, 0x87, 0x78, 0x87,
0x86, // 2008 0xa5, 0xa6, 0xa6, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 2009 0xa5, 0xa6, 0x96, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2010 0x95, 0xb4, 0x96, 0xa5, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x78, 0x87, // 2011 0x96, 0xb4, 0xa5, 0x, 0x, 0xa5, 0xa6, 0x87, 0x88, 0x87, 0x78, 0x87, 0x86, // 2012 0xa5, 0xb3, 0xa5, 0x87, 0x88, 0x88, 0x78, 0x87, 0x87, // 2013 0xa5, 0x, 0x96, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2014 0x95, 0x96, 0x97, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 2015 0x95, 0xB4, 0xA5, 0xB4, 0xA5, 0xA6, 0x87, 0x88, 0x87, 0x78, 0x87, 0x86, // 2016 0xa5, 0xA6, 0xA6, 0x87, 0x88, 0x88, 0x78, 0x87, 0x87, // 2017 0xa5, 0xB4, 0xA6, 0xA5, 0xA6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2018 0xa5, 0x96, 0x96, 0x88, 0x96, 0x96, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, / / 2019 0x95, 0xB4, 0XA5, 0XB4, 0XA5, 0XA6, 0X97, 0X87, 0x87, 0x78, 0x87, 0x86, // 2020 0xa5, 0xc3, 0 XA5, 0XB5, 0XA6, 0XA6, 0X87, 0X88, 0X88, 0X78, 0X87, 0X86, // 2021 0XA5, 0XA6, 0X9, 0XA5, 0XA6, 0X96, 0X88, 0X88, 0X88, 0X78, 0X87, 0x87, // 2022 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x79, 0x77, 0x87, // 2023 0x95, 0xa5, 0xa5, 0x97, 0x87, 0x87, 0x78, 0x87, 0x96 , // 2024 0xA5, 0xc3, 0xa5, 0x87, 0x88, 0x88, 0x78, 0x87, 0x86, // 2025 0XA5, 0XA6, 0XA5, 0XA5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78 , 0x87, 0x87, // 2026 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 2027 0x95, 0xa5, 0xa5, 0x97, 0x87 , 0x87, 0x78, 0x87, 0x96, // 2028 0xa5, 0xc3, 0xa5, 0x, 0x87, 0x88, 0x88, 0x78, 0x87, 0x86, // 2029 0xa5, 0x, 0xa5, 0xa5, 0xA6,
0xA6, 0x88, 0x88, 0x88, 0x78, 030 0xa5, 0x96, 030 0xa5, 0x96, 0x96, 0x88, 0x78, 0x78, 0x78, 0x87, 0x87, // 2031 0x95, 0xB4, 0xA5, 0xB4, 0xA5, 0xA6, 0x97, 0x87, 0x87, 0x78, 0x87, 0x96, // 2032 0XA5, 0XA6, 0XA5, 0X888, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0x78, 0x87, 0x86, // 2033 0XA5, 0xB3, 0xA5, 0xA5, 0xA6, 0xA6, 0x88, 0x78, 0x88, 0x78, 0x87, 0x87, // 2034 0xa5, 0xa6, 0x96, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, / / 2035 0x95, 0xB4, 0xA5, 0X97, 0XA5, 0XA6, 0X97, 0X87, 0x87, 0x78, 0x87, 0x96, // 2036 0XA5, 0XC3, 0XA5, 0X87, 0X888, 0x88, 0x78, 0x87 , 0x86, // 2037 0xa5, 0xa6, 0xa6, 0x88, 0x88, 0x88, 0x78, 0x87, 0x87, // 2038 0xa5, 0x, 0xA6, 0x96, 0x88, 0x88, 0x78 , 0x78, 0x87, 0x87, // 2039 0x95, 0xa5, 0xa6, 0x97, 0x87, 0x87, 0x78, 0x87, 0x96, // 2040 0XA5, 0XC3, 0XA5, 0XB5, 0XA5, 0XA6, 0X87 , 0x88, 0x87, 0x78, 0x87, 0x86, // 2041 0XA5, 0XB3, 0XA5, 0xB5, 0XA6, 0XA6, 0X88, 0X88, 0X88, 0X78 , 0x87, 0x87, // 2042 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2043 0x95, 0xa5, 0xa6, 0x97, 0x87 , 0x87, 0x88, 044 0xa5, 0xc3, 0xa5, 0x, 0x87, 0x88, 0x87, 0x78, 0x87, 0x86, // 2045 0XA5, 0XA6, 0XA6, 0xA6 , 0x87, 0x88, 0x88, 0x78, 046 0xa5, 0xa6, 0x96, 0xa5, 0xa6, 0x96, 0x88, 0x88, 0x78, 0x78, 0x87, 0x87, // 2047 0x95, 0xB4, 0XA5, 0XB4 , 0xa5, 0xa5, 0x97, 0x87, 0x87, 0x88, 048 0xa4, 0xc3, 0xa5, 0xa5, 0xa5, 0xa6, 0x97, 0x87, 0x87, 0x78, 0x87, 0x86, // 2049 0XA5, 0XC3 , 0xA5, 0xB5, 0xA6, 0xA6, 0x87, 0x88, 0x78, 0x78, 0x87, 0x87 // 2050}; # endregion
#Region Core
///
///
IF ((Glunarmonthday [ilunaryear - start_year] & (1 << ibit))> 0)
{Low ;}
IF (ilunarmonth == getleapmonth (ilunaryear) {IF ((glunarmonthday [ilunaryear - start_year] & (1 << (ibit - 1)))> 0) {height = 30;} else {height = 29;}} return (UINT) (T) (UINT) << 16; // combined into uint}
///
///
// The following from the lunar calendar 1901, ISPANDAYS = ISPANDAYS - 49; IYear = start_year; IMONTH = 1; iDay = 1; // Computing Year TMP = (uint) getLunaryEardAys (Iyear); while (ispandays> = TMP ) {ISPANDAYS = ISPANDAYS - TMP; IYEAR ; TMP = (uint) getLunaryEardAys (Iyear);} // calculation month TMP = getLunarmontHDAYS (Iyear, IMONTH); // Take low WHILE (ispandays> = TMP) {ISPANDAYS = ISPANDAYS - TMP; IF (IMONTH == Getleapmonth (Iyear)) {TMP = (Iyear, IMONTH) >> 16) & 0xfff; // Take high IF (ISPANDAYS #Region constellation /// #ndregion #Region /// IF (iDay == day) {if (iDay> 15) {RETURN (IMONTH - 1) * 2 1;} else {return (IMONTH - 1) * 2;}} else {return -1;}} /// #ndregion #Region Annual Month Day /// /// /// #REGION OUTPUT /// /// /// /// /// /// #ndregion} Public class lunardte {private int _y, _m, _d; private string lunardate = ""; private string lunarmonth = ", lunarday =", lunaryear = ""; private string solarterm = ", animal =" public LunarDate (DateTime dt) {LunarDateClass ldc = new LunarDateClass (dt); this.lunarday = ldc.LunarDay; this.lunarmonth = ldc.LunarMonth; this.lunaryear = ldc.LunarYear; this.solarterm = ldc.SolarTerm; this. Animal = ldc.animal; this.lunardate = this.lunaryear "(" this.animal ") year" this.lunarmonth this.lunarday (this.solarterm == "" "": "" This.Solarterm; this._y = ldc.lunardate.year; this._m = ldc.lunardate.mont; this._d = ldc.lunardate.day;} public lunardate (int y, int m, int d) {this ._y = y; this._m = m; this._d = D;} public int year {get {return this._y;}} Public int MONTH {Get {Return this._m;}} Public int day {get {return this._d;}} Public string lunarday {get {return this.lunarday;}} Public String Lunarmonth {get {returnid t tararmonth;}} Public string lunaryear {get {return this.lunaryear;}} Public string solarterm {get {return this.solarterm;}} Public string animal {get {returnid.animal;}} Public new string toString () {return this.lunardate;}} #ndregion }